fix range error when parsing unexpected html-class