fixed remove leaf node flow.