diff --git a/bounce_handler.module b/bounce_handler.module
index f208c09..00d98a7 100644
--- a/bounce_handler.module
+++ b/bounce_handler.module
@@ -87,12 +87,20 @@ function bounce_handler_user_delete($account) {
  * Remove expired bounce messages. Try to unsubscribe users.
  */
 function bounce_handler_cron() {
-  // Find users what have more than the appropriate limit of bounces.
+
+  $soft_limit = variable_get('bounce_handler_unsubscribe_soft_limit', 'Disabled');
+  $hard_limit = variable_get('bounce_handler_unsubscribe_hard_limit', 'Disabled');
+
+  if ($soft_limit === 'Disabled' && $hard_limit === 'Disabled') {
+    // Neither limit has been configured. There's nothing to do here.
+    return;
+  }
+
+  // Find users who have more than the configured limit of bounces.
   $query = db_select('bounce_statistics', 'bs');
   $query->join('users', 'u', 'u.mail = bs.mail');
   $query->addField('u', 'uid', 'uid');
-  $soft_limit = variable_get('bounce_handler_unsubscribe_soft_limit', 'Disabled');
-  $hard_limit = variable_get('bounce_handler_unsubscribe_hard_limit', 'Disabled');
+
   if ($soft_limit != 'Disabled') {
     // We use >= as we could have only hard bounces.
     $query->where('(bs.count - bs.remove) >= :limit', array(':limit' => $soft_limit));
@@ -100,35 +108,35 @@ function bounce_handler_cron() {
   if ($hard_limit != 'Disabled') {
     $query->condition('bs.remove', $hard_limit, '>');
   }
-  if (count($query->conditions()) > 0) {
-    $result = $query->execute();
-    foreach ($result as $user) {
-      // TODO: get supported modules and unsubscribe.
-      if (module_exists('pm_email_notify')) {
-        db_merge('pm_email_notify')
-          ->key(array('user_id' => $user->uid))
-          ->insertFields(
-            array(
-              'user_id' => $user->uid,
-              'email_notify_is_enabled' => 0,
-            )
+
+
+  $result = $query->execute();
+  foreach ($result as $user) {
+    // TODO: get supported modules and unsubscribe.
+    if (module_exists('pm_email_notify')) {
+      db_merge('pm_email_notify')
+        ->key(array('user_id' => $user->uid))
+        ->insertFields(
+          array(
+            'user_id' => $user->uid,
+            'email_notify_is_enabled' => 0,
           )
-          ->updateFields(array(
-              'email_notify_is_enabled' => 0,
-            )
+        )
+        ->updateFields(array(
+            'email_notify_is_enabled' => 0,
           )
+        )
+        ->execute();
+    }
+    if (module_exists('message_notify')) {
+      // There's probably a more elegant way to do this.
+      $message_flags = message_subscribe_flag_get_flags();
+      foreach ($message_flags as $flag_name => $flag) {
+        db_delete('flagging')
+          ->condition('fid', $flag->fid)
+          ->condition('uid', $user->uid)
           ->execute();
       }
-      if (module_exists('message_notify')) {
-        // There's probably a more elegant way to do this.
-        $message_flags = message_subscribe_flag_get_flags();
-        foreach ($message_flags as $flag_name => $flag) {
-          db_delete('flagging')
-            ->condition('fid', $flag->fid)
-            ->condition('uid', $user->uid)
-            ->execute();
-        }
-      }
     }
   }
 
