small fix, due to a variable changing from ptr to reference
small fix, due to a variable changing from ptr to reference

realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core