fixes #2 - resets window on esc