minor fixes to work on windows.