Minor fixes in Realm