diff --git a/uc_file/uc_file.install b/uc_file/uc_file.install
index 62d4cc5..f25ae68 100644
--- a/uc_file/uc_file.install
+++ b/uc_file/uc_file.install
@@ -193,7 +193,7 @@ function uc_file_schema() {
       ),
     ),
     'indexes' => array(
-      'fid' => array('fid'),
+      'fid_uid' => array('fid', 'uid'),
       'uid' => array('uid'),
     ),
     'primary key' => array('fuid'),
@@ -258,3 +258,14 @@ function uc_file_update_7002() {
     db_add_index('uc_files', 'filename', array('filename'));
   }
 }
+
+/**
+ * Change index on uc_file_users.fid to be over fid and uid.
+ */
+function uc_file_update_7003() {
+  // Index may have been changed in 6.x-2.x.
+  if (!db_index_exists('uc_file_users', 'fid_uid')) {
+    db_add_index('uc_file_users', 'fid_uid', array('fid', 'uid'));
+    db_drop_index('uc_file_users', 'fid');
+  }
+}
diff --git a/uc_file/uc_file.module b/uc_file/uc_file.module
index d475ca2..d78dde6 100644
--- a/uc_file/uc_file.module
+++ b/uc_file/uc_file.module
@@ -61,9 +61,9 @@ function uc_file_menu() {
     'type' => MENU_LOCAL_TASK,
     'file' => 'uc_file.pages.inc',
   );
-  $items['download/%/%'] = array(
+  $items['download/%'] = array(
     'page callback' => '_uc_file_download',
-    'page arguments' => array(1, 2),
+    'page arguments' => array(1),
     'access arguments' => array('download file'),
     'type' => MENU_CALLBACK,
     'file' => 'uc_file.pages.inc',
@@ -1668,6 +1668,21 @@ function &uc_file_get_by_key($key) {
   return $cache[$key];
 }
 
+function &uc_file_get_by_uid($uid, $fid) {
+  $cache = _uc_file_get_cache();
+
+  if (!isset($cache[$uid][$fid])) {
+    $cache[$uid][$fid] = db_query("SELECT * FROM {uc_file_users} ufu " .
+      "LEFT JOIN {uc_files} uf ON uf.fid = ufu.fid " .
+      "WHERE ufu.fid = :fid AND ufu.uid = :uid", array(':uid' => $uid, ':fid' => $fid))->fetchObject();
+    if ($cache[$uid][$fid]) {
+      $cache[$uid][$fid]->addresses = unserialize($cache[$uid][$fid]->addresses);
+    }
+  }
+
+  return $cache[$uid][$fid];
+}
+
 /**
  * Adds a file (or files) to a user's list of downloadable files,
  * accumulating limits.
diff --git a/uc_file/uc_file.pages.inc b/uc_file/uc_file.pages.inc
index e6141fb..a33548e 100644
--- a/uc_file/uc_file.pages.inc
+++ b/uc_file/uc_file.pages.inc
@@ -125,7 +125,7 @@ function uc_file_user_downloads($account) {
 
     // Expiration set to 'never'
     if ($file->expiration == FALSE) {
-      $file_link = l(basename($file->filename), 'download/' . $file->fid . '/' . $file->file_key, $onclick);
+      $file_link = l(basename($file->filename), 'download/' . $file->fid, $onclick);
     }
 
     // Expired.
@@ -135,7 +135,7 @@ function uc_file_user_downloads($account) {
 
     // Able to be downloaded.
     else {
-      $file_link = l(basename($file->filename), 'download/' . $file->fid . '/' . $file->file_key, $onclick) . ' (' . t('expires on @date', array('@date' => format_date($file->expiration, 'uc_store'))) . ')';
+      $file_link = l(basename($file->filename), 'download/' . $file->fid, $onclick) . ' (' . t('expires on @date', array('@date' => format_date($file->expiration, 'uc_store'))) . ')';
     }
 
     $files[] = array(
@@ -167,7 +167,7 @@ function uc_file_user_downloads($account) {
  *
  * @see _uc_file_download_validate()
  */
-function _uc_file_download($fid, $key) {
+function _uc_file_download($fid) {
   global $user;
 
   // Error messages for various failed download states.
@@ -183,9 +183,14 @@ function _uc_file_download($fid, $key) {
   );
 
   $ip = ip_address();
-  $file_download = uc_file_get_by_key($key);
+  $file_download = uc_file_get_by_uid($user->uid, $fid);
 
-  $file_download->full_path = uc_file_qualify_file($file_download->filename);
+  if (isset($file_download->filename)) {
+    $file_download->full_path = uc_file_qualify_file($file_download->filename);
+  }
+  else {
+    return MENU_ACCESS_DENIED;
+  }
 
   // If it's ok, we push the file to the user.
   $status = _uc_file_download_validate($file_download, $user, $ip);
diff --git a/uc_file/uc_file.tokens.inc b/uc_file/uc_file.tokens.inc
index d957ea1..1f88d10 100644
--- a/uc_file/uc_file.tokens.inc
+++ b/uc_file/uc_file.tokens.inc
@@ -65,7 +65,7 @@ function theme_uc_file_downloads_token($variables) {
       continue;
     }
 
-    $output .= l($file_download->filename, 'download/' . $file_download->fid . '/' . $file_download->file_key, array('absolute' => TRUE)) . "\n";
+    $output .= l($file_download->filename, 'download/' . $file_download->fid, array('absolute' => TRUE)) . "\n";
   }
 
   return $output;
