Fix middleware error when adding group with children to aggregator

Fix #107