Remove unbalanced closing tag