Fixes for win compatibility
win32 fixes