Fixed issue of MSVC hanging