Updating the removePermission function