Added missing window listener.