prevent stuck/unusable debug window on exit