Fix in computing tree stats.