fixed getTagName so that it returns 0 if the Tag has no name