fixed a few issues in csv export