That code was never correct in the first place.  The index variable is the second parameter passed to the callback function.