modify a bug of template function in 6.47