fixes for Windows build