diff --git a/editor/js/graph.js b/editor/js/graph.js
index 7c447e9f302648147dfa89195764e0938486ed46..665a9e59798d8c97b88e2bd25c68dabe49be7917 100644
--- a/editor/js/graph.js
+++ b/editor/js/graph.js
@@ -75,7 +75,7 @@ export class Graph extends ManagedData {
         // Deactivate physics after a short delay
         this.physicsStopTimeoutId = setTimeout(() => {
             this.stopPhysics();
-            this.storeCurrentData("Physics stopped");
+            this.storeCurrentData("Physics stopped", false);
             this.physicsStopTimeoutId = undefined;
         }, this.physicsDelay);
     }
@@ -116,6 +116,10 @@ export class Graph extends ManagedData {
     getTypeColor(typeClass) {
         var classIndex = this.nodeTypes.indexOf(typeClass);
 
+        if (classIndex <= -1) {
+            return 'black';
+        }
+
         return COLOR_PALETTE[classIndex % COLOR_PALETTE.length];
     }