temp: improve the changes/hacks to get it working on windows