Fix add to tag + refactoring