fix manual visiting in TreeVisitor