Fixed permissions not updated when realm is imported