i or j has gone past it's valid value
i probably can't do, so it is most likly j, this will happen if more replacements are needed than in first file