crash on exit fixed