Various fixes to debugger