Remove extraneous end tag from template.