Minor improvements on windows