fix csv handling