improve HTML parser a little bit