Additional custom html writer changes

This fixes a few things that I've run into so far.