fixed bug in html processing