why don't you switch to defaultContext instead of using windows[0]