diff --git a/matlab/cli/prior.m b/matlab/cli/prior.m
index 1e1fb498513d72f2cc468ff5d0b75add288c6803..efb4468265adb94223f81ecc3716dcbbc6d59b21 100644
--- a/matlab/cli/prior.m
+++ b/matlab/cli/prior.m
@@ -171,6 +171,7 @@ if ismember('moments(distribution)', varargin) % Prior simulations (BK).
                 dr = tmp.pdraws{j,3};
                 oo__ = oo_;
                 oo__.dr = dr;
+                Model=set_parameters_locally(Model,tmp.pdraws{j,1});% Needed to update the covariance matrix of the state innovations.
                 oo__ = disp_th_moments(oo__.dr, [], Model, options_, oo__);
                 FirstOrderMoments(:,iter) = oo__.mean;
                 SecondOrderMoments(:,:,iter) = oo__.var;