fix template compiling error
Merge pull request #8016 from minggo/template-fix

fix template compiling error