fix issues with concurrent updates in aggregator and early termination state update (mega patch)