Bugs with debugger fixed