fix moving average