minor modify to support HTML parsing.