HtmlTemplate bugFix