Update windows filter logic

Could filter more invalid windows now.