fixed some issues with the HTML generator