Misc windows fixes