Fixed Windows compatibility issues