Fix profiler mode hook