Fix cursor positioning for image type.