fix tree reader