diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js
index 9f3d3d930e84ca9535237026cdcffa4e445e9d5d..2c4c2f0f5bc8ece83433611790e41d5f42815218 100644
--- a/pd/nw/pdgui.js
+++ b/pd/nw/pdgui.js
@@ -3684,10 +3684,12 @@ function gui_grid_new(cid, tag, x, y, is_toplevel) {
             class: "border" // now we can inherit the css border styles
         }),
         out_0 = create_item(cid, "rect", {
-            class: "out_0"
+            class: "out_0",
+            style: "display: " + (is_toplevel ? "inline;" : "none;")
         }),
         out_1 = create_item(cid, "rect", {
-            class: "out_1"
+            class: "out_1",
+            style: "display: " + (is_toplevel ? "inline;" : "none;")
         }),
         grid = create_item(cid, "path", {
             class: "grid"