Fixed csv export bug