Fixed bug in ImagePatchUtils.