diff --git a/src/StaticModel.hh b/src/StaticModel.hh
index a6f2b666de38a5fd54b03c061e18bb3e8aef8ca9..8f02c0047373fb20b521ec4a7c392d45009ddda8 100644
--- a/src/StaticModel.hh
+++ b/src/StaticModel.hh
@@ -87,7 +87,8 @@ private:
   int
   getBlockJacobianEndoCol([[maybe_unused]] int blk, int var, [[maybe_unused]] int lag) const override
   {
-    return var;
+    assert(var >= blocks[blk].getRecursiveSize());
+    return var - blocks[blk].getRecursiveSize();
   }
 
   // Write the block structure of the model in the driver file