diff --git a/matlab/add_path_to_mex_files.m b/matlab/add_path_to_mex_files.m
index 2f1fa058d6ece044bba6306d8749b11794eec870..f40257cbf89bd747d4fde984ea6c97fe9b400c28 100644
--- a/matlab/add_path_to_mex_files.m
+++ b/matlab/add_path_to_mex_files.m
@@ -60,7 +60,7 @@ else
                 end
             end
         else
-            tmp = [dynareroot '../mex/matlab/win64-9.4/'];
+            tmp = [dynareroot '../mex/matlab/win64-9.4-9.5/'];
             if exist(tmp, 'dir')
                 mexpath = tmp;
                 if modifypath