Fixed problem with duplicates.