Adding window check