Fix bugs in benchmark_to_csv.