fix tree bug