Fix branches so they terminate in the center of child branches