Bugfix for debugger and profiler