fixed msvc errors