Xml fix

Merge in the changes made to the xml stuff