fixed HTML generation