Some minor fixes for Windows