diff --git a/matlab/perfect-foresight-models/sim1_purely_forward.m b/matlab/perfect-foresight-models/sim1_purely_forward.m
index 8a8fa3294018fd6ce952254eb617dcd47718b781..34b60f510edaaa54be67e4a4f4943ed66a9ee4f1 100644
--- a/matlab/perfect-foresight-models/sim1_purely_forward.m
+++ b/matlab/perfect-foresight-models/sim1_purely_forward.m
@@ -37,7 +37,7 @@ function oo_ = sim1_purely_forward(options_, M_, oo_)
                              1, options_.gstep, options_.solve_tolf, ...
                              options_.solve_tolx, options_.simul.maxit, ...
                              options_.debug,oo_.exo_simul, M_.params, oo_.steady_state, ...
-                             it);
+                             it+M_.maximum_lag);
 
         if info
             oo_.deterministic_simulation.status = 0;