Correct an endcoding problem in the templates