Fixing usage of undefined variable in _callback

Hello,

the variable `i` used in `_callback` function is currently undefined and so it will be interpreted as the property of `window`. I suggest to fix it.

Best regards
Oleg