diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index 43ac5fc7bcfb93a4f373fcea5350106ad6f56bd8..009c8084989252114c2f4f428d2197e3130cb453 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -8516,7 +8516,7 @@ PacExpectationNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
   for (auto it : ec_params_and_vars.second.first)
       output << datatree.symbol_table.getTypeSpecificID(it) + 1 << " ";
   output << "];" << endl
-         << "M_.pac." << model_name << ".ec.vars = [";
+         << "M_.pac." << model_name << ".ec.is_endo = [";
   for (auto it : ec_params_and_vars.second.second)
     output << (it ? "true" : "false") << " ";
   output << "];" << endl