diff --git a/matlab/dsge_simulated_theoretical_correlation.m b/matlab/dsge_simulated_theoretical_correlation.m
index dca1031661427100f3674d93bb485ce9fd67728a..7bc6239c5e87cd526860f7540fb97af2a8cdad52 100644
--- a/matlab/dsge_simulated_theoretical_correlation.m
+++ b/matlab/dsge_simulated_theoretical_correlation.m
@@ -104,6 +104,7 @@ for file = 1:NumberOfDrawsFiles
     for linee = 1:NumberOfDraws
         linea = linea+1;
         if isdrsaved
+            M_=set_parameters_locally(M_,pdraws{linee,1});% Needed to update the covariance matrix of the state innovations.
             dr = pdraws{linee,2};
         else
             M_=set_parameters_locally(M_,pdraws{linee,1});
diff --git a/matlab/dsge_simulated_theoretical_covariance.m b/matlab/dsge_simulated_theoretical_covariance.m
index 19f56297fa220d814a163181d21d651c5e983dcc..e5dfd58e885af623cdf009e87fa9ee7204098bde 100644
--- a/matlab/dsge_simulated_theoretical_covariance.m
+++ b/matlab/dsge_simulated_theoretical_covariance.m
@@ -103,6 +103,7 @@ for file = 1:NumberOfDrawsFiles
     for linee = 1:NumberOfDraws
         linea = linea+1;
         if isdrsaved
+            M_=set_parameters_locally(M_,pdraws{linee,1});% Needed to update the covariance matrix of the state innovations.
             dr = pdraws{linee,2};
         else
             M_=set_parameters_locally(M_,pdraws{linee,1});
diff --git a/matlab/dsge_simulated_theoretical_variance_decomposition.m b/matlab/dsge_simulated_theoretical_variance_decomposition.m
index c1c6d6207748433504e9e67457cbf45601e056f2..6dc7c709f0a687a8f78e3df11af43e3c97749128 100644
--- a/matlab/dsge_simulated_theoretical_variance_decomposition.m
+++ b/matlab/dsge_simulated_theoretical_variance_decomposition.m
@@ -111,6 +111,7 @@ for file = 1:NumberOfDrawsFiles
     for linee = 1:NumberOfDraws
         linea = linea+1;
         if isdrsaved
+            M_=set_parameters_locally(M_,pdraws{linee,1});% Needed to update the covariance matrix of the state innovations.
             dr = pdraws{linee,2};
         else
             M_=set_parameters_locally(M_,pdraws{linee,1});