Fixed issues with access control