diff --git a/R/ecxsys.R b/R/ecxsys.R
index 9c446acb6ab8c40677e5ac4d7b2c113b26a7baac..3ac31f37a193228e6de76c568789fb9ab0e4657a 100644
--- a/R/ecxsys.R
+++ b/R/ecxsys.R
@@ -162,7 +162,7 @@ ecxsys <- function(concentration,
     if (any(is.na(c(all_observations, concentration)))) {
         stop("Values containing NA are not supported.")
     }
-    if (any(all_observations > survival_max || all_observations < 0)) {
+    if (any(all_observations > survival_max | all_observations < 0)) {
         stop("Observed survival must be between 0 and survival_max.")
     }
     conc_shift <- 2  # Powers of ten to shift the control downwards from the