Bug fix: exporting XML twice