Adds profiler.
Fixes possible infinite recursion.