fixed a template ouput bug