fix exiting on fail