Fix htmlBuffer