diff --git a/src/scheduler/Scheduler.cpp b/src/scheduler/Scheduler.cpp
index acd583d873930bba38c48f43dc7cd336ce83268e..0d59e6a4220385df90cf36d4e978087ac570876c 100644
--- a/src/scheduler/Scheduler.cpp
+++ b/src/scheduler/Scheduler.cpp
@@ -638,16 +638,16 @@ Aidge::Elts_t Aidge::Scheduler::getNbAvailableData(const std::shared_ptr<Node>&
         // We are inside an upper operator (for instance a MetaOperator)
         // We need to connect the "local" producer-consumer model to the upper
         // one, by mapping local node inputs to the upper node inputs.
-        IOIndex_t nodeInputIdx = 0;
+        IOIndex_t upperInputIdx = 0;
         for (const auto& input : mGraphView->getOrderedInputs()) {
-            if (input.first == node) {
+            if (input.first == node && input.second == inputIdx) {
                 // Current node is an input
-                const auto upperInput = upperNode->inputs()[nodeInputIdx];
-                if (upperInput.first && nodeInputIdx == inputIdx) {
+                const auto upperInput = upperNode->inputs()[upperInputIdx];
+                if (upperInput.first) {
                     return upperInput.first->getOperator()->getNbProducedData(upperInput.second);
                 }
             }
-            ++nodeInputIdx;
+            ++upperInputIdx;
         }
     }