diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index a2a5a80..26bbd93 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -5,6 +5,8 @@
  * Defines a "managed_file" Form API field and a "file" field for Field module.
  */
 
+use Drupal\entity\EntityFieldQuery;
+
 // Load all Field module hooks for File.
 require_once DRUPAL_ROOT . '/core/modules/file/file.field.inc';
 
@@ -163,8 +165,7 @@ function file_file_download($uri, $field_type = 'file') {
     foreach ($field_references as $entity_type => $type_references) {
       foreach ($type_references as $id => $reference) {
         // Try to load $entity and $field.
-        $entity = entity_load($entity_type, array($id));
-        $entity = reset($entity);
+        $entity = entity_load($entity_type, $id);
         $field = NULL;
         if ($entity) {
           // Load all fields for that entity.
@@ -239,7 +240,7 @@ function file_ajax_upload() {
 
   if (empty($_POST['form_build_id']) || $form_build_id != $_POST['form_build_id']) {
     // Invalid request.
-    drupal_set_message(t('An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (@size) that this server supports.', array('@size' => format_size(file_upload_max_size()))), 'error');
+    drupal_set_message(t('An unrecoverable error occurred. The submitted information does not match the generated form. Try reloading the page and submitting again.'), 'error');
     $commands = array();
     $commands[] = ajax_command_replace(NULL, theme('status_messages'));
     return array('#type' => 'ajax', '#commands' => $commands);
