BLIX-77 fix the IndexOutOfBoundsException issue