Fixed query for dups.