fixup HTML structure