fixes to permissions