win32 fixes
Merge branch 'v2'