Fix warnings reported by MSVC