Fix for invalid conversion issue on Win32