Fixed benchmarking code