Fixed MSVC compile errors