[BUGFIX beta] Do not use a `window` local variable.

Certain tools have a really hard time when you create a local window variable.