diff --git a/includes/file.inc b/includes/file.inc
index 6dc7f88..e5fbe0a 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -1911,7 +1911,7 @@ function file_download() {
       $function = $module . '_file_download';
       $result = $function($uri);
       if ($result == -1) {
-        return drupal_access_denied();
+        return MENU_ACCESS_DENIED;
       }
       if (isset($result) && is_array($result)) {
         $headers = array_merge($headers, $result);
@@ -1921,7 +1921,7 @@ function file_download() {
       file_transfer($uri, $headers);
     }
   }
-  return drupal_not_found();
+  return MENU_NOT_FOUND;
 }
 
 
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 4a73755..06eb6a4 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -486,7 +486,7 @@ function comment_permalink($cid) {
     // Return the node view, this will show the correct comment in context.
     return menu_execute_active_handler('node/' . $node->nid, FALSE);
   }
-  drupal_not_found();
+  return MENU_NOT_FOUND;
 }
 
 /**
diff --git a/modules/image/image.module b/modules/image/image.module
index d2d081c..b41a97c 100644
--- a/modules/image/image.module
+++ b/modules/image/image.module
@@ -661,12 +661,12 @@ function image_style_deliver($style, $scheme) {
   // control access to the file.
   if ($scheme == 'private') {
     if (file_exists($derivative_uri)) {
-      file_download($scheme, file_uri_target($derivative_uri));
+      return file_download($scheme, file_uri_target($derivative_uri));
     }
     else {
       $headers = module_invoke_all('file_download', $image_uri);
       if (in_array(-1, $headers) || empty($headers)) {
-        return drupal_access_denied();
+        return MENU_ACCESS_DENIED;
       }
       if (count($headers)) {
         foreach ($headers as $name => $value) {
