bug fixes and add gdbinit