Fixed a few more leaks in the XML code.