Made csv export work