Temporary fix to checkImagePerm.