fix issue where empty elements like <a></a> show as <a</a> in the parse result