HTMLZ fixes

Fixes for a number of issues reported against HTMLZ output.