more fixes to HTMLItem