fixed bugs in tree extractor
bug in control flow
bugfix
full pipeline