I think this `i` is global.