Hopefully final fixes for Windows.