Fix the case where there is no tagName and node_type != 3