Fix MSVC build.
Fix warnings.