fix csv conversion bug