Added safety check for tag renaming
Unused tags are removed on post edit