fix instant crash on windows