Fixing warnings on MSVC due to type conversions.