Keep window in the closure