diff --git a/colorbox.theme.inc b/colorbox.theme.inc
index d140488..8f6af68 100644
--- a/colorbox.theme.inc
+++ b/colorbox.theme.inc
@@ -38,13 +38,17 @@ function theme_colorbox_image_formatter($variables) {
   switch ($settings['colorbox_caption']) {
      case 'auto':
       // If the title is empty use alt or the node title in that order.
-      if (empty($image['title'])) {
-        if (!empty($image['alt'])) {
-          $caption = $image['alt'];
-        }
-        elseif (!empty($node->title)) {
-          $caption = $node->title;
-        }
+      if (!empty($image['title'])) {
+        $caption = $image['title'];
+      }
+      elseif (!empty($image['alt'])) {
+        $caption = $image['alt'];
+      }
+      elseif (!empty($node->title)) {
+        $caption = $node->title;
+      }
+      else {
+        $caption = '';
       }
       break;
     case 'title':
