diff --git a/guacamole-common-js/src/main/resources/layer.js b/guacamole-common-js/src/main/resources/layer.js
index <HASH>..<HASH> 100644
--- a/guacamole-common-js/src/main/resources/layer.js
+++ b/guacamole-common-js/src/main/resources/layer.js
@@ -168,6 +168,10 @@ Guacamole.Layer = function(width, height) {
         width = newWidth;
         height = newHeight;
 
+        // Acknowledge reset of stack (happens on resize of canvas)
+        stackSize = 0;
+        displayContext.save();
+
     }
 
     /**
Reset internal stack state when stack automatically reset from resize.