diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m
index 11a754d0fff1ee30aa737367b21a8e4f28424d9c..1294f7b5fd063b21f20b19fb1ab8fe8b769fc33a 100644
--- a/matlab/dynare_estimation_init.m
+++ b/matlab/dynare_estimation_init.m
@@ -133,7 +133,7 @@ end
 % Check if a _prior_restrictions.m file exists
 if exist([M_.fname '_prior_restrictions.m'])
     options_.prior_restrictions.status = 1;
-    options_.prior_restrictions.routine = str2func([M_.fname '_prior_restrictions.m']);
+    options_.prior_restrictions.routine = str2func([M_.fname '_prior_restrictions']);
 end
 
 % Check that the provided mode_file is compatible with the current estimation settings.