Fixed errors with MSVC