diff --git a/matlab/+occbin/set_default_options.m b/matlab/+occbin/set_default_options.m
index 45f2aa6da9a1512da07b884c5596b15d5cec9bf1..99a1e2e1f8af76bff9413dfba5c886efe9f0e820 100644
--- a/matlab/+occbin/set_default_options.m
+++ b/matlab/+occbin/set_default_options.m
@@ -44,6 +44,7 @@ end
 if ismember(flag,{'filter','all'})
     options_occbin_.filter.state_covariance = false;
     options_occbin_.filter.guess_regime = false;
+    options_occbin_.filter.periodic_solution = true;
     options_occbin_.filter.use_relaxation = false;
 end
 
diff --git a/matlab/parallel/closeSlave.m b/matlab/parallel/closeSlave.m
index 5d3f443fdf3b18a8849c1f0c0fba15f85e93cded..4b1c4fadf4fab9146f6bba9a4b05ae569c8346c2 100644
--- a/matlab/parallel/closeSlave.m
+++ b/matlab/parallel/closeSlave.m
@@ -61,7 +61,7 @@ for indPC=1:length(Parallel)
 end
 
 while(1)
-    if isempty(dynareParallelDir(['P_slave_',int2str(j),'End.txt'],TmpFolder,Parallel))
+    if isempty(dynareParallelDir(['P_slave_*End.txt'],TmpFolder,Parallel))
         for indPC=1:length(Parallel)
             if (Parallel(indPC).Local==0)
                 dynareParallelRmDir(TmpFolder,Parallel(indPC))