Some tweaks to the image translate code