diff --git a/geomagio/algorithm/SqDistAlgorithm.py b/geomagio/algorithm/SqDistAlgorithm.py
index e850ab0ea5fec7020854d1e03a10c13178989b6d..a3a97e08ae1ca5450b82fb608a3fffcb630522ee 100644
--- a/geomagio/algorithm/SqDistAlgorithm.py
+++ b/geomagio/algorithm/SqDistAlgorithm.py
@@ -533,7 +533,7 @@ class SqDistAlgorithm(Algorithm):
             # endif (np.isnan(et) or np.abs(et) > zthresh * sigma[i])
 
             # freeze state with last input for reinitialization
-            if i == (len(yobs)-1):
+            if i == (len(yobs) - 1):
                 yhat0 = yhat[len(yobs):(len(yobs) + hstep)].copy()
                 s0 = s[len(yobs):(len(yobs) + m)].copy() - r[i + 1]
                 l0 = l + r[i + 1]