diff --git a/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_setup.m b/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_setup.m
index 88b784f6c55b4b43e80c264505c82449ce978a8f..6724545c64d586f510a8f9cc608e41c4087533ae 100644
--- a/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_setup.m
+++ b/matlab/perfect-foresight-models/perfect_foresight_with_expectation_errors_setup.m
@@ -1,6 +1,6 @@
 function perfect_foresight_with_expectation_errors_setup
 
-% Copyright (C) 2021 Dynare Team
+% Copyright © 2021-2022 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -58,9 +58,9 @@ oo_.pfwee.shocks_info = NaN(M_.exo_nbr, periods, periods); % 2nd dimension is re
 for i = 1:size(raw_csv, 2)
     exo_id = strmatch(exo_header_names{i}, M_.exo_names, 'exact');
     period_id = raw_csv(1, i);
-    oo_.pfwee.terminal_info(exo_id, period_id) = raw_csv(2, i);
     % Ignore irrelevant periods when copying shocks information
-    oo_.pfwee.shocks_info(exo_id, period_id:end, period_id) = raw_csv(2+period_id:end, i);
+    oo_.pfwee.shocks_info(exo_id, period_id:end, period_id) = raw_csv(1+period_id:end-1, i);
+    oo_.pfwee.terminal_info(exo_id, period_id) = raw_csv(end, i);
 end
 
 % Build initial paths for endos and exos (only initial conditions are set, the rest is NaN)
diff --git a/tests/deterministic_simulations/pfwee.csv b/tests/deterministic_simulations/pfwee.csv
index 4e0614a09b721dba555f59093c5baf32ae333154..1865e5780e6bc41ba57f351efd528a601b313c84 100644
--- a/tests/deterministic_simulations/pfwee.csv
+++ b/tests/deterministic_simulations/pfwee.csv
@@ -1,6 +1,5 @@
 Exo,x,x,x,x,x,x,x
 Period (info),1,2,3,4,5,6,7
-Terminal,1,1.1,1.2,1.2,1.2,1.1,1.1
 Period 1 (real),1.2,,,,,,
 Period 2 (real),1,1.3,,,,,
 Period 3 (real),1,1,1.4,,,,
@@ -8,3 +7,4 @@ Period 4 (real),1,1,1,1,,,
 Period 5 (real),1,1,1,1,1,,
 Period 6 (real),1,1,1,1,1,1.1,
 Period 7 (real),1,1,1,1,1,1.1,1.1
+Terminal,1,1.1,1.2,1.2,1.2,1.1,1.1