Small improvements to profiler.