diff --git a/include/hpp/manipulation/graph/node.hh b/include/hpp/manipulation/graph/node.hh
index feb3ade493ceaf6ab20b62f9fb9be37247719534..a340fcdd06d6072cd4484db7578b85f527781dcd 100644
--- a/include/hpp/manipulation/graph/node.hh
+++ b/include/hpp/manipulation/graph/node.hh
@@ -48,7 +48,7 @@ namespace hpp {
           /// \note You should note use that to know in which states a
           /// configuration is. This only checks if the configuration satisfies
           /// the constraints. Instead, use the class NodeSelector.
-          virtual bool contains (const Configuration_t config) const;
+          virtual bool contains (const Configuration_t config);
 
           /// Get the parent NodeSelector.
           NodeSelectorWkPtr_t nodeSelector ()
diff --git a/src/graph/graph.cc b/src/graph/graph.cc
index 893f37ac0e80e87505d2c4dc1282689ea72bf738..17b2b28d5ab0170cfdeaa7c81939ae8a921392e6 100644
--- a/src/graph/graph.cc
+++ b/src/graph/graph.cc
@@ -51,7 +51,7 @@ namespace hpp {
       {
         Nodes_t nodes;
         for (NodeSelectors_t::iterator it = nodeSelectors_.begin();
-            it == nodeSelectors_.end(); it++)
+            it != nodeSelectors_.end(); it++)
           nodes.push_back( (*it)->getNode(config) );
         return nodes;
       }
diff --git a/src/graph/node.cc b/src/graph/node.cc
index f51b4781afdc7f63b10f86f38842de64aad4f1b4..12f62604f6d7292efd0d7f018403a129cfd85e90 100644
--- a/src/graph/node.cc
+++ b/src/graph/node.cc
@@ -64,13 +64,13 @@ namespace hpp {
         return newEdge;
       }
 
-      bool Node::contains (const Configuration_t config) const
+      bool Node::contains (const Configuration_t config)
       {
         // TODO: This is not the most efficient way. We should
         // compute the value of the constraint instead of apllying
         // the constraint.
         Configuration_t cfg = config;
-        return configConstraints_->apply(cfg) && ( cfg == config );
+        return configConstraint()->apply(cfg) && ( cfg == config );
       }
 
       std::ostream& Node::print (std::ostream& os) const