fix warnings reported by MSVC
fix more MSVC warnings