I think you can use `@(i)` here to box your primitive variable.