Fixed various quirks for Windows