fixing/patching/hacking stuff to make it work on windows