fix warnings from MSVC