diff --git a/cleanpager.module b/cleanpager.module
index c83b379..8b5830b 100644
--- a/cleanpager.module
+++ b/cleanpager.module
@@ -15,7 +15,7 @@ function cleanpager_menu() {
     'access arguments' => array('cleanpager administer'),
     'type' => MENU_NORMAL_ITEM,
   );
-  
+
   return $items;
 }
 
@@ -25,14 +25,14 @@ function cleanpager_menu() {
  */
 function cleanpager_admin_settings($form, &$form_state) {
    $form = array();
-      
+
   $form['cleanpager_pages'] = array(
     '#title' => t('Pages'),
     '#description' => t('Set which pages to apply clean pagination to. Put each page on a new line and use the full page name, without a leading slash. Probably the easiest way to test this out to to create a view with only 1 or 2 nodes per page and add the URL to this list. An example how you would type a page is "admin/content/node".'),
     '#type' => 'textarea',
     '#rows' => '7',
     '#default_value' => variable_get('cleanpager_pages',''),
-  );  
+  );
   $form['cleanpager_use_seo_links']= array(
     '#title' => t('Use SEO Links'),
     '#description' => t('Using SEO links will add the page URL to the pagination links, and then will remove them via jquery once the page is loaded.'),
@@ -114,7 +114,7 @@ function cleanpager_theme_pager_link($variables) {
   $element = $variables['element'];
   $parameters = $variables['parameters'];
   $attributes = $variables['attributes'];
-  
+
   $page = isset($_GET['page']) ? $_GET['page'] : '';
   if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) {
     $parameters['page'] = $new_page;
@@ -149,7 +149,7 @@ function cleanpager_theme_pager_link($variables) {
       $attributes['title'] = t('Go to page @number', array('@number' => $text));
     }
   }
-  
+
   $q = $_GET['q'];
   if ($cleanpage) {
     $q = cleanpager_path();
@@ -157,12 +157,12 @@ function cleanpager_theme_pager_link($variables) {
       $cleanpage .= '/'. CLEANPAGER_ADDITIONAL_PATH_VARIABLE;
     }
   }
-  
+
   if (isset($new_page) && $cleanpage && $new_page > 0) {
     if (variable_get('cleanpager_use_seo_links', '') == 1) {
       $text = 'Visit '. $q . ' Page ' . ($text);
     }
-    return l($text, $cleanpage .'/'. $new_page, array('attributes' => $attributes));
+    return l($text, $cleanpage .'/'. $new_page, array('attributes' => $attributes, 'query' => $query));
   }
 
   return l($text, $q, array('attributes' => $attributes, 'query' => $query));
@@ -201,7 +201,7 @@ function _cleanpager_rewrite_path(&$pager = FALSE, &$page = NULL) {
       else {
         $pr = TRUE;
       }
-      
+
       if ($pr) {
         $q = implode('/', $q_array);
         $_REQUEST['q'] = $_GET['q'] = $q;
