fix bugs in rbtree