reset on exit