Fix Win32 code path