minor fixes, added recheck and exit