Fix bug in Python aggregator.