diff --git a/loopy/statistics.py b/loopy/statistics.py
index 7b1a5c7da6335fa2111d3f27bf4e8d0a3cd92090..60a6e8911d02e100858378ffa2748054b7379c66 100755
--- a/loopy/statistics.py
+++ b/loopy/statistics.py
@@ -416,6 +416,7 @@ class RegisterUsageEstimator(CombineMapper):
             return 0
         else:
             self.vars_found.append(expr)
+            print("new var found: ", expr)
             if "_dim_" in str(expr): #TODO how to remove block/thread size/id vars?
                 return 0
             else:
diff --git a/test/test_statistics.py b/test/test_statistics.py
index 7d89a521dd72eea0d2a0309ade6b72eab80b09c6..ffef1996e780f110dd3a4909b19a3fbcbb6e915d 100644
--- a/test/test_statistics.py
+++ b/test/test_statistics.py
@@ -526,6 +526,7 @@ def test_reg_counter_basic():
     knl = lp.add_and_infer_dtypes(knl,
                         dict(a=np.float32, b=np.float32, g=np.float64, h=np.float64))
     regs = get_regs_per_thread(knl)
+    #1/0
     assert regs == 6