Fix export to csv