fixing js bug on windows