Fixed thread problem in AnalysisTreeBuilder