fixed tree bug