Fix off-by-i error

Tested.
Add test for Set with arguments