fixed process not exiting on error