Fix issue with the removal of permissions