fix tree template