diff --git a/include/hpp/manipulation/symbolic-component.hh b/include/hpp/manipulation/symbolic-component.hh
index da122d513dc5ac0a0b6c553e11b7f5197c5fcd13..0648b0818ee86093159773a56cf499587b79de98 100644
--- a/include/hpp/manipulation/symbolic-component.hh
+++ b/include/hpp/manipulation/symbolic-component.hh
@@ -34,7 +34,7 @@ namespace hpp {
     class HPP_MANIPULATION_DLLAPI SymbolicComponent
     {
       public:
-        typedef std::set<SymbolicComponentPtr_t> SymbolicComponents_t;
+        typedef std::set<SymbolicComponent*> SymbolicComponents_t;
 
         /// return a shared pointer to new instance
         static SymbolicComponentPtr_t create (const RoadmapPtr_t& roadmap);
diff --git a/src/symbolic-component.cc b/src/symbolic-component.cc
index 8de3e738223360648c757e05ecc04c331e8ff093..3eb5ed2028c227ceb12be9eca823dbd64af02936 100644
--- a/src/symbolic-component.cc
+++ b/src/symbolic-component.cc
@@ -52,18 +52,18 @@ namespace hpp {
     {
       if (otherCC->state_ != state_) return false;
       SymbolicComponents_t::const_iterator it = std::find
-        (to_.begin(), to_.end(), otherCC);
+        (to_.begin(), to_.end(), otherCC.get());
       if (it == to_.end()) return false;
       it = std::find
-        (from_.begin(), from_.end(), otherCC);
+        (from_.begin(), from_.end(), otherCC.get());
       if (it == from_.end()) return false;
       return true;
     }
 
     void SymbolicComponent::canReach (const SymbolicComponentPtr_t& otherCC)
     {
-      to_.insert(otherCC);
-      otherCC->from_.insert(weak_.lock());
+      to_.insert(otherCC.get());
+      otherCC->from_.insert(this);
     }
 
     void SymbolicComponent::merge (SymbolicComponentPtr_t other)
@@ -79,11 +79,11 @@ namespace hpp {
       // Add other's nodes to this list.
       nodes_.insert (nodes_.end (), other->nodes_.begin(), other->nodes_.end());
 
-      from_.erase (other);
-      other->from_.erase (weak_.lock());
+      from_.erase (other.get());
+      other->from_.erase (this);
       from_.insert (other->from_.begin(), other->from_.end());
-      to_.erase (other);
-      other->to_.erase (weak_.lock());
+      to_.erase (other.get());
+      other->to_.erase (this);
       to_.insert (other->to_.begin(), other->to_.end());
     }