ArrayIndexOutOfBoundsException in getResponseAnswerHtml #2581

Fixes #2581