Fixed a bug in the html generation