fixed bugs in rbtree