Fix up the XML generation