Fixed some implicit casts msvc didn't like. (just warnings)