Fixed bug with profiler