Some fixes after testing on windows.