diff --git a/src/ewokscore/graph/subgraph.py b/src/ewokscore/graph/subgraph.py
index 7aee689fd035e26db69d123832bd26163e54d393..522aeb5e53e3d8b6cb1e2eb9775bdd8f0dfbefa3 100644
--- a/src/ewokscore/graph/subgraph.py
+++ b/src/ewokscore/graph/subgraph.py
@@ -173,7 +173,9 @@ def _replace_aliases(
 
     new_aliases = list()
     for alias_attrs in aliases:
-        node_id = alias_attrs["node"]
+        node_id = alias_attrs.get("node")
+        if node_id is None:
+            continue
         sub_node = alias_attrs.pop("sub_node", None)
         if sub_node:
             node_id = node_id, sub_node
diff --git a/src/ewokscore/tests/test_sub_graph_serialize.py b/src/ewokscore/tests/test_sub_graph_serialize.py
index a95ad6ad79bf457c5fd7167546cd60cb8afee9f1..95d189d893edcb386dc1ce8dd0b03d517bebf870 100644
--- a/src/ewokscore/tests/test_sub_graph_serialize.py
+++ b/src/ewokscore/tests/test_sub_graph_serialize.py
@@ -9,8 +9,8 @@ def subsubsubgraph():
     return {
         "graph": {
             "id": "subsubsubgraph",
-            "input_nodes": [{"id": "in", "node": "task1"}],
-            "output_nodes": [{"id": "out", "node": "task2"}],
+            "input_nodes": [{"id": "in", "node": "task1"}, {"id": "notconnected"}],
+            "output_nodes": [{"id": "out", "node": "task2"}, {"id": "notconnected"}],
         },
         "nodes": [
             {
@@ -38,9 +38,10 @@ def subsubgraph(_subsubsubgraph):
     return {
         "graph": {
             "id": "subsubgraph",
-            "input_nodes": [{"id": "in", "node": "task1"}],
+            "input_nodes": [{"id": "in", "node": "task1"}, {"id": "notconnected"}],
             "output_nodes": [
-                {"id": "out", "node": "subsubsubgraph", "sub_node": "out"}
+                {"id": "out", "node": "subsubsubgraph", "sub_node": "out"},
+                {"id": "notconnected"},
             ],
         },
         "nodes": [