Fixed add() bug in tree.