Fix bug about re-tag and capitalize tag name