diff --git a/mex/sources/bytecode/bytecode.cc b/mex/sources/bytecode/bytecode.cc
index fada2bf13e0c0d03e16ed08bf3ae991cf530abe0..5a08c6754a122676e3ca006f6ccaa07d5eee8f4d 100644
--- a/mex/sources/bytecode/bytecode.cc
+++ b/mex/sources/bytecode/bytecode.cc
@@ -707,16 +707,25 @@ main(int nrhs, const char *prhs[])
     DYN_MEX_FUNC_ERR_MSG_TXT("verbosity is not a field of options_");
   if (verbose)
     print_it = true;
-  field = mxGetFieldNumber(options_, "simul");
-  mxArray *simul;
+  if (!steady_state)
+    field = mxGetFieldNumber(options_, "simul");
+  else
+    field = mxGetFieldNumber(options_, "steady");
+  mxArray *temporaryfield;
   if (field >= 0)
-    simul = mxGetFieldByNumber(options_, 0, field);
+    temporaryfield = mxGetFieldByNumber(options_, 0, field);
   else
-    DYN_MEX_FUNC_ERR_MSG_TXT("simul is not a field of options_");
-  field = mxGetFieldNumber(simul, "maxit");
+    if (!steady_state)
+      DYN_MEX_FUNC_ERR_MSG_TXT("simul is not a field of options_");
+    else
+      DYN_MEX_FUNC_ERR_MSG_TXT("steady is not a field of options_");
+  field = mxGetFieldNumber(temporaryfield, "maxit");
   if (field<0)
-    DYN_MEX_FUNC_ERR_MSG_TXT("maxit is not a field of options_.simul");
-  int maxit_ = int (floor(*(mxGetPr(mxGetFieldByNumber(simul, 0, field)))));
+    if (!steady_state)
+      DYN_MEX_FUNC_ERR_MSG_TXT("maxit is not a field of options_.simul");
+    else
+      DYN_MEX_FUNC_ERR_MSG_TXT("maxit is not a field of options_.steady");
+  int maxit_ = int (floor(*(mxGetPr(mxGetFieldByNumber(temporaryfield, 0, field)))));
   field = mxGetFieldNumber(options_, "slowc");
   if (field < 0)
     DYN_MEX_FUNC_ERR_MSG_TXT("slows is not a field of options_");