[CDE-253]: fixed bug in getHtmlObjects function

@pamval please review