Crash fix util.nearest and image.fixpix