fix tree parse closing early