fixes tags merging by removing duplicates