diff --git a/facetapi.admin.js b/facetapi.admin.js
index 5f124c3..bb1a16a 100644
--- a/facetapi.admin.js
+++ b/facetapi.admin.js
@@ -1,16 +1,14 @@
-(function ($) {
-
-Drupal.behaviors.facetapi = {
-  attach: function(context, settings) {
-    // Ensures ALL soft limit select boxes are updated.
-    // @see http://drupal.org/node/735528
-    $('select[name="soft_limit"]').change(function() {
+Drupal.behaviors.facetapi = function(context) {
+  var settings = Drupal.settings;
+  // Ensures ALL soft limit select boxes are updated.
+  // @see http://drupal.org/node/735528
+  $('select[name="soft_limit"]').change(function() {
       $('select[name="soft_limit"]').val($(this).val());
     });
 
-    // Ensures ALL nofollow checkboxes are updated.
-    // @see http://drupal.org/node/735528
-    $('input[name="nofollow"]').change(function() {
+  // Ensures ALL nofollow checkboxes are updated.
+  // @see http://drupal.org/node/735528
+  $('input[name="nofollow"]').change(function() {
       if ($(this).attr('checked')) {
         $('input[name="nofollow"]').attr('checked', 'checked');
       }
@@ -19,9 +17,9 @@ Drupal.behaviors.facetapi = {
       }
     });
 
-    // Ensures ALL show expanded checkboxes are updated.
-    // @see http://drupal.org/node/735528
-    $('input[name="show_expanded"]').change(function() {
+  // Ensures ALL show expanded checkboxes are updated.
+  // @see http://drupal.org/node/735528
+  $('input[name="show_expanded"]').change(function() {
       if ($(this).attr('checked')) {
         $('input[name="show_expanded"]').attr('checked', 'checked');
       }
@@ -30,12 +28,12 @@ Drupal.behaviors.facetapi = {
       }
     });
 
-    // Handles bug where input format fieldset is not hidden.
-    // @see http://drupal.org/node/997826
-    if ($('select[name="empty_behavior"]').val() != 'text') {
-      $('fieldset#edit-empty-text-format').hide();
-    }
-    $('select[name="empty_behavior"]').change(function() {
+  // Handles bug where input format fieldset is not hidden.
+  // @see http://drupal.org/node/997826
+  if ($('select[name="empty_behavior"]').val() != 'text') {
+    $('fieldset#edit-empty-text-format').hide();
+  }
+  $('select[name="empty_behavior"]').change(function() {
       if ($(this).val() != 'text') {
         $('fieldset#edit-empty-text-format').hide();
       }
@@ -43,7 +41,4 @@ Drupal.behaviors.facetapi = {
         $('fieldset#edit-empty-text-format').show();
       }
     });
-  }
 }
-
-})(jQuery);
diff --git a/facetapi.block.inc b/facetapi.block.inc
index cef3723..7134626 100644
--- a/facetapi.block.inc
+++ b/facetapi.block.inc
@@ -281,4 +281,4 @@ function facetapi_hash_base64($data) {
   $hash = base64_encode(hash('sha256', $data, TRUE));
   // Modify the hash so it's safe to use in URLs.
   return strtr($hash, array('+' => '-', '/' => '_', '=' => ''));
-}
\ No newline at end of file
+}
diff --git a/facetapi.js b/facetapi.js
index 1fed227..de41127 100644
--- a/facetapi.js
+++ b/facetapi.js
@@ -1,21 +1,18 @@
-(function ($) {
-
-Drupal.behaviors.facetapi = {
-  attach: function(context, settings) {
-    // Iterates over facet settings, applies functionality like the "Show more"
-    // links for block realm facets.
-    // @todo We need some sort of JS API so we don't have to make decisions
-    // based on the realm.
-    if (settings.facetapi) {
-      for (var index in settings.facetapi.facets) {
-        if (null != settings.facetapi.facets[index].makeCheckboxes) {
-          // Find all checkbox facet links and give them a checkbox.
-          $('#' + settings.facetapi.facets[index].id + ' a.facetapi-checkbox', context).each(Drupal.facetapi.makeCheckbox);
-        }
-        if (null != settings.facetapi.facets[index].limit) {
-          // Applies soft limit to the list.
-          Drupal.facetapi.applyLimit(settings.facetapi.facets[index]);
-        }
+Drupal.behaviors.facetapi = function(context) {
+  var settings = Drupal.settings;
+  // Iterates over facet settings, applies functionality like the "Show more"
+  // links for block realm facets.
+  // @todo We need some sort of JS API so we don't have to make decisions
+  // based on the realm.
+  if (settings.facetapi) {
+    for (var index in settings.facetapi.facets) {
+      if (null != settings.facetapi.facets[index].makeCheckboxes) {
+        // Find all checkbox facet links and give them a checkbox.
+        $('#' + settings.facetapi.facets[index].id + ' a.facetapi-checkbox', context).each(Drupal.facetapi.makeCheckbox);
+      }
+      if (null != settings.facetapi.facets[index].limit) {
+        // Applies soft limit to the list.
+        Drupal.facetapi.applyLimit(settings.facetapi.facets[index]);
       }
     }
   }
diff --git a/plugins/facetapi/empty_behavior_text.inc b/plugins/facetapi/empty_behavior_text.inc
index 5160194..aefc980 100644
--- a/plugins/facetapi/empty_behavior_text.inc
+++ b/plugins/facetapi/empty_behavior_text.inc
@@ -20,7 +20,7 @@ class FacetapiEmptyBehaviorText extends FacetapiEmptyBehavior {
    * Checks if a format was selected, calls parent's constructor.
    */
   public function __construct(stdClass $settings) {
-    if (isset($settings->settings['empty_text']['format'])) {
+    if (isset($settings->settings['empty_text_format'])) {
       $this->formatSet = TRUE;
     }
     parent::__construct($settings);
@@ -30,9 +30,9 @@ class FacetapiEmptyBehaviorText extends FacetapiEmptyBehavior {
    * Returns an empty array.
    */
   public function execute() {
-    $format_id = $this->settings['empty_text']['format'];
-    $text = $this->translate('empty_text', $this->settings['empty_text']['value']);
-    return array('#value' => check_markup($text, $format_id));
+    $format_id = $this->settings['empty_text_format'];
+    $text = $this->translate('empty_text', $this->settings['empty_text']);
+    return check_markup($text, $format_id);
   }
 
   /**
@@ -40,23 +40,25 @@ class FacetapiEmptyBehaviorText extends FacetapiEmptyBehavior {
    */
   public function settingsForm(&$form, &$form_state) {
     global $user;
-    $format_id = ($this->formatSet) ? $this->settings['empty_text']['format'] : FILTER_FORMAT_DEFAULT;
-    $format = filter_format_load($format_id);
 
+    $format_id = filter_resolve_format(($this->formatSet) ? $this->settings['empty_text_format'] : FILTER_FORMAT_DEFAULT);
+    $format = filter_format_load($format_id);
     // NOTE: There is a core bug with form #states and the text_format #type.
     // @see http://drupal.org/node/997826
     $form['widget']['empty']['empty_text'] = array(
-      '#type' => 'text_format',
+      '#type' => 'textarea',
       '#access' => $format && filter_access($format, $user),
       '#title' => t('Empty text'),
-      '#default_value' => $this->settings['empty_text']['value'],
-      '#format' => $format_id,
+      '#default_value' => $this->settings['empty_text'],
+      /*
       '#states' => array(
         'visible' => array(
           'select[name="empty_behavior"]' => array('value' => 'text'),
         ),
       ),
+      */
     );
+    $form['widget']['empty']['empty_text_format'] = filter_form($format_id);
   }
 
   /**
@@ -64,10 +66,8 @@ class FacetapiEmptyBehaviorText extends FacetapiEmptyBehavior {
    */
   public function getDefaultSettings() {
     return array(
-      'empty_text' => array(
-        'value' => '',
-        'format' => FILTER_FORMAT_DEFAULT,
-      ),
+      'empty_text' => '',
+      'empty_text_format' => FILTER_FORMAT_DEFAULT,
     );
   }
 }
