Fixed type conversion warnings which break a Win32 debug build (MSVC).