fix a bug when parsing an HTML fails