Added window check for toolbar, etc.