fix hang on win32