fix imagePerms