fix an XmlElement memory leak