Minor fix to csv generator