Crashes on exit, but not so much during the app any more