Fixed a wrong index.

There was a `j` that should have been `i`.