fixed bug on windows, thanks Derrick