diff --git a/include/core/state_block/has_state_blocks.h b/include/core/state_block/has_state_blocks.h
index e9e9223512c390eb628d80a6d9b021c93dafa1d5..958b4f199e4a69eb41e8edd78d78fe2bf7834c5f 100644
--- a/include/core/state_block/has_state_blocks.h
+++ b/include/core/state_block/has_state_blocks.h
@@ -25,7 +25,7 @@ class HasStateBlocks
 
         const StateStructure& getStructure() const { return structure_; }
         void appendToStructure(const std::string& _frame_type){ structure_ += _frame_type; }
-        bool isInStructure(const std::string& _sb_type) { return structure_.find(_sb_type); }
+        bool isInStructure(const std::string& _sb_type) { return structure_.find(_sb_type) != std::string::npos; }
 
         const std::unordered_map<std::string, StateBlockPtr>& getStateBlockMap() const;
         std::vector<StateBlockPtr> getStateBlockVec() const;
@@ -156,7 +156,7 @@ inline StateBlockPtr HasStateBlocks::emplaceStateBlock(const std::string& _sb_ty
 
 inline bool HasStateBlocks::setStateBlock(const std::string _sb_type, const StateBlockPtr& _sb)
 {
-    assert (structure_.find(_sb_type) && "Cannot set a state block out of the state structure! Use addStateBlock instead.");
+    assert (structure_.find(_sb_type) != std::string::npos && "Cannot set a state block out of the state structure! Use addStateBlock instead.");
     assert ( state_block_map_.count(_sb_type) > 0 && "Cannot set an inexistent state block! Use addStateBlock instead.");
     state_block_map_.at(_sb_type) = _sb;
     return true; // success