Fixed a couple bugs in MovingAverage