Trying to fix an HTML generation problem