diff --git a/matlab/kalman/missing_DiffuseKalmanSmootherH3_Z.m b/matlab/kalman/missing_DiffuseKalmanSmootherH3_Z.m
index 2b6f9046681e1916fd64a62465cf26df5539391c..366e415f4a8a51b728427a1d363dfde2abaa0cf7 100644
--- a/matlab/kalman/missing_DiffuseKalmanSmootherH3_Z.m
+++ b/matlab/kalman/missing_DiffuseKalmanSmootherH3_Z.m
@@ -544,7 +544,7 @@ while notsteady && t<smpl
             opts_simul.init_regime = []; %regimes_(t);
             opts_simul.waitbar=0;
             options_.occbin.simul=opts_simul;
-            [~, out] = occbin.solver(M_,options_,dr,steady_state,exo_steady_state,exo_det_steady_state);
+            [~, out] = occbin.solver(M_,options_,dr,endo_steady_state,exo_steady_state,exo_det_steady_state);
         end
         for jnk=1:nk
             if filter_covariance_flag