fixed error messages on permission check