r2.sh: small fixes