Don't set `_open` on thread.message. It should be a local scope variable, not stored in the threading storage. The thread directive creates a new scope. This can be exactly as in viewer.html.