Fixed some MSVC crashes.