Remove duplicate tags in tag.py and auto-add for existing tags