Corrected serious regression in html output that caused a stack overflow. hah!