diff --git a/src/ShortestPath/Transit/TransitAlgorithmState.h b/src/ShortestPath/Transit/TransitAlgorithmState.h
index 3af927b5f87e5e5e86b9efc0cdf60f213e268284..d069858f14e66d27b6590f9c72a434d338c81393 100644
--- a/src/ShortestPath/Transit/TransitAlgorithmState.h
+++ b/src/ShortestPath/Transit/TransitAlgorithmState.h
@@ -160,7 +160,7 @@ public:
      */
     [[nodiscard]] bool strictlyDominates(const TransitAlgorithmState& rhs) const {
         return this->getNodeIndex() == rhs.getNodeIndex()
-        && this->getLastConnectionLine() == rhs.getLastConnectionLine()
+        && this->getLastConnectionLine().getLineId() == rhs.getLastConnectionLine().getLineId()
 //        /*TODO : check */ && (this->getLastConnectionLine() == rhs.getLastConnectionLine() || this->getNbConnections() == 2) /***/
         && ((this->getInstant() < rhs.getInstant() && this->getConnections().size() <= rhs.getConnections().size())
         || (this->getInstant() == rhs.getInstant() && this->getConnections().size() < rhs.getConnections().size()));