diff --git a/matlab/dyn_ramsey_static.m b/matlab/dyn_ramsey_static.m
index 33069c600c8c1ba94f7b006659b30e31321953e1..32eaa745bd549855324ab66dfca103f5ced98298 100644
--- a/matlab/dyn_ramsey_static.m
+++ b/matlab/dyn_ramsey_static.m
@@ -137,11 +137,11 @@ Uyy = reshape(Uyy,endo_nbr,endo_nbr);
 % depends on multipliers to 0 to compute residuals
 if (options_.bytecode)
    [chck, res, junk] = bytecode('static',xx,[oo.exo_simul oo.exo_det_simul], ...
-               M.params, 'evaluate'); 
+               params, 'evaluate');
    fJ = junk.g1;
 else
    [res,fJ] = feval([fname '_static'],xx,[oo.exo_simul oo.exo_det_simul], ...
-               M.params);
+               params);
 end
 % index of multipliers and corresponding equations
 % the auxiliary variables before the Lagrange multipliers are treated