fixes @nholmgaard's pull request for windows