Correct rb tree logic.