Make the tag editor much more robust