Fixed some data export bugs