diff --git a/uuid_file/uuid_file.module b/uuid_file/uuid_file.module
index 055278e..449edf4 100644
--- a/uuid_file/uuid_file.module
+++ b/uuid_file/uuid_file.module
@@ -5,8 +5,8 @@ module_load_include('inc', 'uuid');
 /**
  * Implements hook_file_presave().
  */
-function uuid_file_file_presave(&$file) {
-  if (empty($file->fid)) {
+function uuid_file_file_presave($file) {
+  if (empty($file->uuid)) {
     $file->uuid = uuid_uuid();
   }
 }
