windows fixes

minimal fix to have it worky on windows