Fix the bug in the AVL rebalancing functions.