Fix circulate_leaves