IndexOfBounds error fixed in test.