fix moving averages