fixing a bug with export xml