fix parse tree generation