diff --git a/package/samplers/ctpe/sampler.py b/package/samplers/ctpe/sampler.py
index ca55c0e7..35c1db2b 100644
--- a/package/samplers/ctpe/sampler.py
+++ b/package/samplers/ctpe/sampler.py
@@ -109,8 +109,8 @@ def _build_parzen_estimators_for_constraints_and_get_quantiles(
         mpes_below: list[_ParzenEstimator] = []
         mpes_above: list[_ParzenEstimator] = []
         quantiles: list[float] = []
-        for constraint_vals in constraints_vals.T:
-            is_satisfied = constraint_vals <= 0
+        for cstr_vals in constraints_vals.T:
+            is_satisfied = np.logical_or(cstr_vals <= 0, cstr_vals == max(cstr_vals))
             satisfied_trials = [t for t, include in zip(trials, is_satisfied) if include]
             unsatisfied_trials = [t for t, exclude in zip(trials, is_satisfied) if not exclude]
             mpes_below.append(