Change how waiting for window to exists is handled