slight improvements to profiler