fixes to main tree template