msvc build fixes. explicit casts required.