diff --git a/views_accordion_style_plugin.inc b/views_accordion_style_plugin.inc
index 6728a29..373e69d 100644
--- a/views_accordion_style_plugin.inc
+++ b/views_accordion_style_plugin.inc
@@ -170,6 +170,9 @@ class views_accordion_style_plugin extends views_plugin_style {
    * pre_render() necesary to prevent markup mayhem
    */
   function pre_render($result) {
+    drupal_add_library('system', 'ui.accordion');
+    drupal_add_js(drupal_get_path('module', 'views_accordion') .'/views-accordion.js');
+
     // no need do anything if we are using the grouped field as the header
     if ($this->options['use-grouping-header']){
       return;
@@ -223,9 +226,6 @@ class views_accordion_style_plugin extends views_plugin_style {
 
     // dpm($this->display->handler->get_option('fields')); // for dev-troubleshooting
 
-    drupal_add_library('system', 'ui.accordion');
-    drupal_add_js(drupal_get_path('module', 'views_accordion') .'/views-accordion.js');
-
     // Add the appropiate effect library if necessary
     $effect = $this->options['animated'];
     if(($effect !== 'none') && ($effect !== 'slide')){
