diff --git a/media_gallery.module b/media_gallery.module
index d6e0ff5..06a38a6 100644
--- a/media_gallery.module
+++ b/media_gallery.module
@@ -520,6 +520,8 @@ function media_gallery_update($node) {
  */
 function media_gallery_block_info() {
   $blocks = array();
+  // @todo Field media_gallery_expose_block is not created during installation.
+  return $blocks;
 
   // Define a block for each media gallery node that is configured to expose
   // one.
@@ -796,9 +798,11 @@ function media_gallery_remove_item_from_gallery($node, $media) {
 function media_gallery_entity_info_alter(&$info) {
   // For each media field formatter we add, we also need to add the
   // corresponding media entity view mode.
-  foreach (media_gallery_field_formatter_info() as $formatter_name => $formatter_info) {
-    if (in_array('media', $formatter_info['field types'])) {
-      $info['media']['view modes'][$formatter_name] = array('label' => $formatter_info['label'], 'custom settings' => FALSE);
+  if (isset($info['media'])) {
+    foreach (media_gallery_field_formatter_info() as $formatter_name => $formatter_info) {
+      if (in_array('media', $formatter_info['field types'])) {
+        $info['media']['view modes'][$formatter_name] = array('label' => $formatter_info['label'], 'custom settings' => FALSE);
+      }
     }
   }
   // Add a view mode for displaying a node in a media gallery block.
