fixes to work on windows

not sure of the perfect way to fix this :)