Index: src/hugo/list_graph.h
===================================================================
--- src/hugo/list_graph.h	(revision 911)
+++ src/hugo/list_graph.h	(revision 916)
@@ -103,4 +103,5 @@
 	first_free_edge(_g.first_free_edge) {}
     
+    /// \bug In the vector can be hole if a node is erased from the graph.
     ///Number of nodes.
     int nodeNum() const { return nodes.size(); }
@@ -580,5 +581,5 @@
       OutEdgeIt() {}
       OutEdgeIt(const SymListGraph& g, Edge e) { 
-	if (e.id & 1 == 0) {	
+	if ((e.id & 1) == 0) {	
 	  out = Parent::OutEdgeIt(g, SymEdge(e));
 	  in = Parent::InEdgeIt(g, g.tail(e));
@@ -617,5 +618,5 @@
       InEdgeIt() {}
       InEdgeIt(const SymListGraph& g, Edge e) { 
-	if (e.id & 1 == 0) {	
+	if ((e.id & 1) == 0) {	
 	  out = Parent::OutEdgeIt(g, SymEdge(e));
 	  in = Parent::InEdgeIt(g, g.tail(e));
@@ -733,10 +734,10 @@
 
     Node tail(Edge e) const { 
-      return e.id & 1 == 0 ? 
+      return (e.id & 1) == 0 ? 
 	Parent::tail(SymEdge(e)) : Parent::head(SymEdge(e)); 
     }
 
     Node head(Edge e) const { 
-      return e.id & 1 == 0 ? 
+      return (e.id & 1) == 0 ? 
 	Parent::head(SymEdge(e)) : Parent::tail(SymEdge(e)); 
     }
@@ -823,12 +824,12 @@
     }
 
-    /// Finds an symmetric edge between two nodes.
-
-    /// Finds an symmetric edge from node \c u to node \c v.
-    ///
-    /// If \c prev is \ref INVALID (this is the default value), then
-    /// It finds the first edge from \c u to \c v. Otherwise it looks for
-    /// the next edge from \c u to \c v after \c prev.
-    /// \return The found edge or INVALID if there is no such an edge.
+//     /// Finds an symmetric edge between two nodes.
+
+//     /// Finds an symmetric edge from node \c u to node \c v.
+//     ///
+//     /// If \c prev is \ref INVALID (this is the default value), then
+//     /// It finds the first edge from \c u to \c v. Otherwise it looks for
+//     /// the next edge from \c u to \c v after \c prev.
+//     /// \return The found edge or INVALID if there is no such an edge.
 
 //     SymEdge findEdge(Node u, Node v, SymEdge prev = INVALID) 
@@ -874,5 +875,5 @@
 
     static Edge backward(SymEdge e) {
-      return Edge((id(e) << 1) & 1);
+      return Edge((id(e) << 1) | 1);
     }
 
Index: src/hugo/smart_graph.h
===================================================================
--- src/hugo/smart_graph.h	(revision 909)
+++ src/hugo/smart_graph.h	(revision 916)
@@ -395,5 +395,5 @@
       OutEdgeIt() {}
       OutEdgeIt(const SymSmartGraph& g, Edge e) { 
-	if (e.id & 1 == 0) {	
+	if ((e.id & 1) == 0) {	
 	  out = Parent::OutEdgeIt(g, SymEdge(e));
 	  in = Parent::InEdgeIt(g, g.tail(e));
@@ -432,5 +432,5 @@
       InEdgeIt() {}
       InEdgeIt(const SymSmartGraph& g, Edge e) { 
-	if (e.id & 1 == 0) {	
+	if ((e.id & 1) == 0) {	
 	  out = Parent::OutEdgeIt(g, SymEdge(e));
 	  in = Parent::InEdgeIt(g, g.tail(e));
@@ -541,10 +541,10 @@
 
     Node tail(Edge e) const { 
-      return e.id & 1 == 0 ? 
+      return (e.id & 1) == 0 ? 
 	Parent::tail(SymEdge(e)) : Parent::head(SymEdge(e)); 
     }
 
     Node head(Edge e) const { 
-      return e.id & 1 == 0 ? 
+      return (e.id & 1) == 0 ? 
 	Parent::head(SymEdge(e)) : Parent::tail(SymEdge(e)); 
     }
@@ -631,12 +631,12 @@
     }
 
-    /// Finds an symmetric edge between two nodes.
-
-    /// Finds an symmetric edge from node \c u to node \c v.
-    ///
-    /// If \c prev is \ref INVALID (this is the default value), then
-    /// It finds the first edge from \c u to \c v. Otherwise it looks for
-    /// the next edge from \c u to \c v after \c prev.
-    /// \return The found edge or INVALID if there is no such an edge.
+//     /// Finds an symmetric edge between two nodes.
+
+//     /// Finds an symmetric edge from node \c u to node \c v.
+//     ///
+//     /// If \c prev is \ref INVALID (this is the default value), then
+//     /// It finds the first edge from \c u to \c v. Otherwise it looks for
+//     /// the next edge from \c u to \c v after \c prev.
+//     /// \return The found edge or INVALID if there is no such an edge.
 
 //     SymEdge findEdge(Node u, Node v, SymEdge prev = INVALID) 
@@ -668,5 +668,5 @@
 
     static Edge backward(SymEdge e) {
-      return Edge((id(e) << 1) & 1);
+      return Edge((id(e) << 1) | 1);
     }
 
Index: src/test/graph_test.h
===================================================================
--- src/test/graph_test.h	(revision 906)
+++ src/test/graph_test.h	(revision 916)
@@ -299,4 +299,5 @@
       for(int i=0;i<nn;i++) {
 	check(e!=INVALID,"Wrong OutEdge list linking.");
+	check(n==G.tail(e), "Wrong OutEdge list linking.");
 	++e;
       }
@@ -311,4 +312,5 @@
       for(int i=0;i<nn;i++) {
 	check(e!=INVALID,"Wrong InEdge list linking.");
+	check(n==G.head(e), "Wrong InEdge list linking.");
 	++e;
       }
