FIX: XML malformation

An extra and duplicated </xml> tag was added to the end of the document