Fixed a for loop

CalcSpeed now works as it should.