fix error when csv contains UTF-8 encoding weirdness