fix a tree bug