House keeping
Fixed crash on exit