fixes to the stat agg / EWR machine