sync gdb state with browser; fix bugs