fixed and html generation bug