diff --git a/main.cpp b/main.cpp
index 19754a6..6cb5f3a 100644
--- a/main.cpp
+++ b/main.cpp
@@ -67,8 +67,8 @@ Input download(const string& address)
         curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
         res = curl_easy_perform(curl);
         if (!res){
-            double speed;
-            res1 = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed);
+            curl_off_t speed;
+            res1 = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed);
             if(!res1){
                 cout << "Upload speed bytes/sec\n" << speed;
                 exit(1);