Fixes for win32