Changed i variable to j
The server wasn't going over all the items before.