Fixed bug on returning the appropriate xml.