Close Window if empty.