diff --git a/matlab/optimization/dynare_minimize_objective.m b/matlab/optimization/dynare_minimize_objective.m
index 5466d2330da9871d2e53b743265162a5a78d32f1..990f9b146e08310cd2dc72077bb60a7800bcd32b 100644
--- a/matlab/optimization/dynare_minimize_objective.m
+++ b/matlab/optimization/dynare_minimize_objective.m
@@ -631,9 +631,9 @@ switch minimizer_algorithm
     end
   case 102
     if isoctave
-        error('Optimization algorithm 2 is not available under Octave')
+        error('Optimization algorithm 102 is not available under Octave')
     elseif ~user_has_matlab_license('GADS_Toolbox')
-        error('Optimization algorithm 2 requires the Global Optimization Toolbox')
+        error('Optimization algorithm 102 requires the Global Optimization Toolbox')
     end
     % Set default optimization options for simulannealbnd.
     if ~isoctave