Fixes for win32 platform