some fixes for MSWin32