Fixed problems with Permissions.