some win32 fixes

Change-Id: I9d86e295169585ffafd82de80d8ad004a647de33