fix windows scripting issues