fixing issue with duplicate tag entries in a dictionary.