Stop crash on exit