fixed csv export bugs