Fixing running average calls so that they only refer to historical data