remove ref to window