because otherwise it references $i from the script itself, not the one that's running inside the chroot