diff --git a/ivette/src/frama-c/dive/Dive.tsx b/ivette/src/frama-c/dive/Dive.tsx
index 7edc9f8da8bd47f5d6a73541e7663131255b2c24..ef9b4160b77bbaa585dc075a010b0bc75e90886b 100644
--- a/ivette/src/frama-c/dive/Dive.tsx
+++ b/ivette/src/frama-c/dive/Dive.tsx
@@ -121,12 +121,12 @@ class Dive {
     return commands;
   }
 
-  remove(node: Cytoscape.NodeCollection): void {
+  remove(node: Cytoscape.NodeSingular) {
     const parent = node.parent();
     node.remove();
     this.cy.$id(`${node.id()}-more`).remove();
     if (parent.nonempty() && parent.children().empty())
-      this.remove(parent); // Recursively remove parents
+      this.remove(parent as Cytoscape.NodeSingular); // Recursively remove parents
   }
 
   referenceFile(fileName: string): Cytoscape.NodeSingular {