Fix function, fix csv debug