updated tag name handling