Fixed windows script errors