bugfix for crash on windows