Fixed Win compatibility issues