Some fixes for MSVC warnings.