diff --git a/ldap/admin/src/scripts/dn2rdn.in b/ldap/admin/src/scripts/dn2rdn.in
index 3974b00..b707efc 100755
--- a/ldap/admin/src/scripts/dn2rdn.in
+++ b/ldap/admin/src/scripts/dn2rdn.in
@@ -27,12 +27,12 @@ do
         h) usage
            exit 0;;
         Z) servid=$OPTARG;;
-        d) arg=$arg" -d \"$OPTARG\"";;
-        a) arg=$arg" -a \"$OPTARG\""
+        d) args=$args" -d \"$OPTARG\"";;
+        a) args=$args" -a \"$OPTARG\""
            archive="provided";;
-        v) arg=$arg" -v";;
-        f) arg=$arg" -f";;
-        D) arg=$arg" -D \"$OPTARG\"";;
+        v) args=$args" -v";;
+        f) args=$args" -f";;
+        D) args=$args" -D \"$OPTARG\"";;
         ?) usage
            exit 1;;
     esac
