Update csv.js

Fix a bug on csv export