fix bad perm