remove extraneous closing tag