minor fixes to make it work on windows again