diff --git a/matlab/initial_estimation_checks.m b/matlab/initial_estimation_checks.m
index 7dfc4d9a2a74e2bd2bdd7800b4a887c16234b944..6facae426b318dcbb698be854894e6ae900a6981 100644
--- a/matlab/initial_estimation_checks.m
+++ b/matlab/initial_estimation_checks.m
@@ -106,7 +106,7 @@ end
 test_for_deep_parameters_calibration(Model);
 
 [lnprior, junk1,junk2,info]= priordens(xparam1,BayesInfo.pshape,BayesInfo.p6,BayesInfo.p7,BayesInfo.p3,BayesInfo.p4);
-if info
+if any(info)
     fprintf('The prior density evaluated at the initial values is Inf for the following parameters: %s\n',BayesInfo.name{info,1})
     error('The initial value of the prior is -Inf')
 end