fix string cast in new CSV function