fix bug with granting permissions for parrents