Some small fixes for Win32