Small fixes to make more pleasant on Windows