add some specific casts to avoid MSVC warnery
explicit casts help mitigate MSVC warnery