Fix warnings when using profiler.