minor bug fixes and some more benchmarking utility