diff --git a/SharpMath/Geometry/MatrixEnumerator.cs b/SharpMath/Geometry/MatrixEnumerator.cs
index 0bceeea..f96fa5c 100644
--- a/SharpMath/Geometry/MatrixEnumerator.cs
+++ b/SharpMath/Geometry/MatrixEnumerator.cs
@@ -26,7 +26,7 @@ public void Dispose()
         public bool MoveNext()
         {
             _index++;
-            return _index < _matrix.ColumnCount + _matrix.RowCount;
+            return _index < _matrix.ColumnCount * _matrix.RowCount;
         }
 
         public void Reset()
@@ -36,4 +36,4 @@ public void Reset()
 
         public double Current => _matrix[(uint) _index % _matrix.ColumnCount, (uint) _index / _matrix.RowCount];
     }
-}
\ No newline at end of file
+}