Removing window reference