fixed tf tree mistakes