Fixed a couple of crashes reported on OpenEye