diff --git a/src/manipulation-planner.cc b/src/manipulation-planner.cc
index 5950d3b2359cbd0c48e42301fd536237d4fcf421..3e13a38c066eb77f8d40586ee98731d3a1312f6e 100644
--- a/src/manipulation-planner.cc
+++ b/src/manipulation-planner.cc
@@ -398,10 +398,7 @@ namespace hpp {
               itn2 != knearest.end (); ++itn2) {
             bool _1to2 = (*itn1)->isOutNeighbor (*itn2);
             bool _2to1 = (*itn1)->isInNeighbor (*itn2);
-            if (_1to2 && _2to1) {
-              hppDout (info, "the two nodes are already connected");
-              continue;
-            }
+            assert (!_1to2 || !_2to1);
 
             const Configuration_t& q2 (*(*itn2)->configuration ());
             graph::StatePtr_t s2 = getState (graph, *itn2);
@@ -445,10 +442,7 @@ namespace hpp {
             continue;
           bool _1to2 = (*itn1)->isOutNeighbor (*itn2);
           bool _2to1 = (*itn1)->isInNeighbor (*itn2);
-          if (_1to2 && _2to1) {
-            hppDout (info, "the two nodes are already connected");
-            continue;
-          }
+          assert (!_1to2 || !_2to1);
           const Configuration_t& q2 (*(*itn2)->configuration ());
           graph::StatePtr_t s2 = getState (graph, *itn2);
           assert (q1 != q2);