fix embarrasing duplicate match bug