fixed ArrayIndexOutOfBoundsException

belongs to 1.5.1