Better checking for windows