fix small perms bug