Fixed the indices of the array.