diff --git a/src/state_block/state_block_derived.cpp b/src/state_block/state_block_derived.cpp
index d9548374c7efbff7a3558c95970293810ecf2288..5f43e96c7a15f7e0a426d5279cbf3ea77b2f7feb 100644
--- a/src/state_block/state_block_derived.cpp
+++ b/src/state_block/state_block_derived.cpp
@@ -30,7 +30,7 @@ StateBlockPtr StateVector3d::create(const Eigen::VectorXd& _state, bool _fixed)
 
 StateBlockPtr create_point(const Eigen::VectorXd& _state, bool _fixed)
 {
-    assert(_state.size() == 2 or _state.size() == 3 && "Provided _state must be size 2 or 3!");
+    assert((_state.size() == 2 or _state.size() == 3) && "Provided _state must be size 2 or 3!");
     if (_state.size() == 2)
         return std::make_shared<StatePoint2d>(_state, _fixed);
     else
@@ -39,7 +39,7 @@ StateBlockPtr create_point(const Eigen::VectorXd& _state, bool _fixed)
 
 StateBlockPtr create_vector(const Eigen::VectorXd& _state, bool _fixed)
 {
-    assert(_state.size() == 2 or _state.size() == 3 && "Provided _state must be size 2 or 3!");
+    assert((_state.size() == 2 or _state.size() == 3) && "Provided _state must be size 2 or 3!");
     if (_state.size() == 2)
         return std::make_shared<StateVector2d>(_state, _fixed);
     else