fix a bug when exporting to csv

add “csv” action