Fixes for profiler and debugger