Fix exceptions in benchmarks.