fix a compiling error in MSVC

fix errors in MSVC after #388