Fix for doubled queries in profiler