bug fix to get script to work on windows