diff --git a/matlab/gsa/stab_map_.m b/matlab/gsa/stab_map_.m
index 7be2d9f6654268931568614f3f0c641115343ce1..85ef3676127e1440a629ad1b2af64dd8efe06563 100644
--- a/matlab/gsa/stab_map_.m
+++ b/matlab/gsa/stab_map_.m
@@ -107,6 +107,10 @@ else  % estimated parameters but no declared priors
     % maximum likelihood with inequality constraints for the parameters.
     bounds.lb = lb;
     bounds.ub = ub;
+    if opt_gsa.prior_range==0
+        warning('GSA:: When using ML, sampling from the prior is not possible. Setting prior_range=1')
+        opt_gsa.prior_range=1;
+    end
 end
 
 if nargin==0,