fixes segfault error which was created because of a disconnected tree generation in an aggregation tree