fix to csv writer extra [ ] issue