Some fixes to prevent realm adminstrators being system administrators.