BUG fix: bad logic caused error (with getFirstElementFromNodeByTagName).