diff --git a/logo_block.install b/logo_block.install
index 97acb56..cceb970 100644
--- a/logo_block.install
+++ b/logo_block.install
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Install file for Logo Block
+ * Install file for Logo Block.
  */
 
 /**
diff --git a/logo_block.module b/logo_block.module
index 1996587..f9595fa 100644
--- a/logo_block.module
+++ b/logo_block.module
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Hooks and public functions for Logo Block
+ * Hooks and public functions for Logo Block.
  */
 
 /**
@@ -14,6 +14,17 @@ function logo_block_theme() {
       'render element' => 'element',
       'file' => 'logo_block.theme.inc',
     ),
+    'logo_block_image_style' => array(
+      'variables' => array(
+        'style_name' => NULL,
+        'path' => NULL,
+        'width' => NULL,
+        'height' => NULL,
+        'alt' => '',
+        'title' => NULL,
+        'attributes' => array(),
+      ),
+    ),
   );
 }
 
@@ -38,10 +49,14 @@ function logo_block_block_configure($delta = '') {
       '#type' => 'textfield',
       '#title' => t('Link the logotype to this page'),
       '#default_value' => variable_get('logo_block_link', '<front>'),
-      '#description' => t('The path for this link. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page. If this field is left empty, no link will be created for the image.', array(
-        '%front' => '<front>',
-        '%add-node' => 'node/add',
-        '%drupal' => 'http://drupal.org')),
+      '#description' => t(
+        'The path for this link. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page. If this field is left empty, no link will be created for the image.',
+        array(
+          '%front' => '<front>',
+          '%add-node' => 'node/add',
+          '%drupal' => 'http://drupal.org',
+        )
+      ),
     );
     $image_styles = image_styles();
     $formatted_styles = array();
@@ -90,7 +105,6 @@ function logo_block_block_save($delta = '', $edit = array()) {
 function logo_block_block_view($delta = '') {
   $block = array();
   if ($delta === 'logo') {
-    $logo_path = '';
     $default_logo = theme_get_setting('default_logo');
     if ($default_logo) {
       $logo_path = logo_block_get_default_logo_path();
@@ -98,7 +112,7 @@ function logo_block_block_view($delta = '') {
     else {
       $logo_path = theme_get_setting('logo_path');
     }
-    if ($logo_path) {
+    if (!empty($logo_path)) {
       $site_name = variable_get('site_name', '');
       $block['content'] = array(
         '#path' => $logo_path,
@@ -107,14 +121,12 @@ function logo_block_block_view($delta = '') {
         '#theme' => 'image',
         '#theme_wrappers' => array('logo_block_wrapper'),
       );
-      if (!$default_logo) {
-        $image_style = variable_get('logo_block_style', '_none');
-        if ($image_style !== '_none') {
-          $block['content']['#style_name'] = $image_style;
-          $block['content']['#theme'] = 'image_style';
-          $block['content']['#width'] = '';
-          $block['content']['#height'] = '';
-        }
+      $image_style = variable_get('logo_block_style', '_none');
+      if ($image_style !== '_none') {
+        $block['content']['#style_name'] = $image_style;
+        $block['content']['#theme'] = 'logo_block_image_style';
+        $block['content']['#width'] = '';
+        $block['content']['#height'] = '';
       }
     }
     else {
@@ -140,3 +152,31 @@ function logo_block_get_default_logo_path($theme = NULL) {
   }
   return $logo_path;
 }
+
+/**
+ * Returns HTML for an image using a specific image style.
+ *
+ * Clones theme_image_style() with the additional step of forcing the creation
+ * of the derivative to bypass any 404 issues.
+ *
+ * @see theme_image_style()
+ */
+function theme_logo_block_image_style($variables) {
+  // Determine the dimensions of the styled image.
+  $dimensions = array(
+    'width' => $variables['width'],
+    'height' => $variables['height'],
+  );
+  image_style_transform_dimensions($variables['style_name'], $dimensions);
+
+  $variables['width'] = $dimensions['width'];
+  $variables['height'] = $dimensions['height'];
+
+  $image_style_dest_path = image_style_path($variables['style_name'], $variables['path']);
+  if (!file_exists($image_style_dest_path)) {
+    $style = image_style_load($variables['style_name']);
+    image_style_create_derivative($style, $variables['path'], $image_style_dest_path);
+  }
+  $variables['path'] = file_create_url($image_style_dest_path);
+  return theme('image', $variables);
+}
diff --git a/logo_block.theme.inc b/logo_block.theme.inc
index 5572318..2be243b 100644
--- a/logo_block.theme.inc
+++ b/logo_block.theme.inc
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Theme callback functions for Logo Block
+ * Theme callback functions for Logo Block.
  */
 
 /**
@@ -12,10 +12,15 @@ function theme_logo_block_wrapper($variables) {
   $site_name = variable_get('site_name', '');
   $link = variable_get('logo_block_link', '');
   if ($link) {
-    return l($variables['element']['#children'], $link, array(
-      'absolute' => TRUE,
-      'attributes' => array('title' => $site_name),
-      'html' => TRUE));
+    return l(
+      $variables['element']['#children'],
+      $link,
+      array(
+        'absolute' => TRUE,
+        'attributes' => array('title' => $site_name),
+        'html' => TRUE,
+      )
+    );
   }
   return $variables['element']['#children'];
 }
