fix template bug in msvc