Mismatch in array index