diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc
index 9930215917c0cab6edee04d46994a2a803311bc6..8f098f08551223219a0b4e1e7620be0aaf235727 100644
--- a/preprocessor/ComputingTasks.cc
+++ b/preprocessor/ComputingTasks.cc
@@ -813,8 +813,8 @@ EstimatedParamsStatement::writeOutput(ostream &output, const string &basename, b
 {
   output << "estim_params_.var_exo = zeros(0, 10);" << endl
          << "estim_params_.var_endo = zeros(0, 10);" << endl
-         << "estim_params_.corrx = zeros(0, 10);" << endl
-         << "estim_params_.corrn = zeros(0, 10);" << endl
+         << "estim_params_.corrx = zeros(0, 11);" << endl
+         << "estim_params_.corrn = zeros(0, 11);" << endl
          << "estim_params_.param_vals = zeros(0, 10);" << endl;
 
   for (vector<EstimationParams>::const_iterator it = estim_params_list.begin(); it != estim_params_list.end(); it++)
@@ -840,7 +840,7 @@ EstimatedParamsStatement::writeOutput(ostream &output, const string &basename, b
             output << "estim_params_.corrx = [estim_params_.corrx; ";
           else if (symb_type == eEndogenous)
             output << "estim_params_.corrn = [estim_params_.corrn; ";
-          output << symb_id << " " << symbol_table.getTypeSpecificID(it->name2)+1;
+          output << symb_id << ", " << symbol_table.getTypeSpecificID(it->name2)+1;
           break;
         }
       output << ", ";