Fixing cumulative average