diff --git a/Script/ValueHolder.cpp b/Script/ValueHolder.cpp
index 3f50f93..5b7cdbc 100644
--- a/Script/ValueHolder.cpp
+++ b/Script/ValueHolder.cpp
@@ -527,7 +527,7 @@ bool ValueHolder::logicOperator(ParserOperator op, const ValueHolder& other) con
             ret = intOp(mv_i, std::get<int>(*other.mval()));
         else if (otherType == Type::Real)
             ret = realOp(static_cast<double>(mv_i), std::get<double>(*other.mval())); // TODO  use some comparison with an epsilon value
-        if (otherType == Type::Bool)
+        else if (otherType == Type::Bool)
             ret = boolOp(mv_i, std::get<bool>(*other.mval()));
         else if (otherType == Type::Void)
             ret = 0;
@@ -594,7 +594,7 @@ bool ValueHolder::logicOperator(ParserOperator op, const ValueHolder& other) con
             ret = stringOpL(mv_s, std::get<int>(*other.mval()));
         else if (otherType == Type::Real)
             ret = stringOpL(mv_s, std::get<double>(*other.mval()) != 0); // TODO  use some comparison with an epsilon value
-        if (otherType == Type::Bool)
+        else if (otherType == Type::Bool)
             ret = boolOp(!mv_s.empty(), std::get<bool>(*other.mval()));
         else if (otherType == Type::Void)
             ret = 0;