fix bug in data export