Why does this clean the tree twice?