fixed html generation