clean tree before updating