Fix compatibility with HtmlObject