--- tool/CommandDownload.cpp	2015-03-19 17:05:08.388000002 +0100
+++ tool/CommandDownload.cpp.patched	2015-03-19 17:10:56.267000001 +0100
@@ -183,7 +183,7 @@
             throwCommandException(e.what());
         } catch (ios::failure &e) {
             delete [] data.data;
-            err << "Invalid value argument '" << args[2]
+            err << "Invalid value argument '" << args[valueIndex]
                 << "' for type '" << dataType->name << "'!";
             throwInvalidUsageException(err);
         }
@@ -205,7 +205,7 @@
             throwCommandException(e.what());
         } catch (ios::failure &e) {
             delete [] data.data;
-            err << "Invalid value argument '" << args[2]
+            err << "Invalid value argument '" << args[valueIndex]
                 << "' for type '" << dataType->name << "'!";
             throwInvalidUsageException(err);
         }
@@ -219,7 +219,7 @@
         throwCommandException(e.what());
     } catch (ios::failure &e) {
         delete [] data.data;
-        err << "Invalid value argument '" << args[2]
+        err << "Invalid value argument '" << args[valueIndex]
             << "' for type '" << dataType->name << "'!";
         throwInvalidUsageException(err);
     }
