Fixing error recovery and deletion of XML.