port fix for image equality over from pyret runtime