Fix crash on windows.