fixed export to csv