fix for bad perms