clear everything in destroctor
fixed crash on exit