Fixed script and test on windows