Some  windows-specific fixes