fix some problems with the debugger