Sorry, `i` is right, but use `length` instead.