cleanup the permissions