minor Fix window check