diff --git a/src/processor/processor_motion.cpp b/src/processor/processor_motion.cpp
index 1818c2fbb57aabadd33af0203a4083483aa931bd..e1746423ede422b999b387b71882735f6ff58b93 100644
--- a/src/processor/processor_motion.cpp
+++ b/src/processor/processor_motion.cpp
@@ -625,7 +625,7 @@ void ProcessorMotion::setProblem(ProblemPtr _problem)
         return;
 
     std::string str = "Processor works with " + std::to_string(dim_) + "D but problem is " + std::to_string(_problem->getDim()) + "D";
-    assert(dim_ == 0 or dim_ == _problem->getDim() && str.c_str());
+    assert(((dim_ == 0) or (dim_ == _problem->getDim())) && str.c_str());
 
     if (_problem == this->getProblem())
         return;