Fix tags and duplicates