Fixed compiling with MSVC
merged heads