Fixed MSVC compile errors.