Fixes to html lib