diff --git a/matlab/perfect-foresight-models/perfect_foresight_setup.m b/matlab/perfect-foresight-models/perfect_foresight_setup.m
index a8a22878430112b34e03d2d125e1803450e56873..805d8022131a6a3caa5e7eb87b4c01bf0c0ff566 100644
--- a/matlab/perfect-foresight-models/perfect_foresight_setup.m
+++ b/matlab/perfect-foresight-models/perfect_foresight_setup.m
@@ -55,7 +55,7 @@ if ~isempty(M_.det_shocks) && options_.periods<max([M_.det_shocks.periods])
     % Some expected shocks happen after the terminal period.
     mess = sprintf('Problem with the declaration of the expected shocks:\n');
     for i=1:length(M_.det_shocks)
-        if any(M_.det_shocks(i).periods>options_.periods);
+        if any(M_.det_shocks(i).periods>options_.periods)
             mess = sprintf('%s\n   At least one expected value for %s has been declared after the terminal period.', mess, M_.exo_names{M_.det_shocks(i).exo_id});
         end
     end