fixed memory leaks and bugs
Merge branch 'plugin/basic_aggregator' into release/5.3.0