Fix a bug which prevents hl2.exe from closing properly on exit