tree bug fix