diff --git a/apachesolr_search.pages.inc b/apachesolr_search.pages.inc
index ae8ce13..73a82f6 100644
--- a/apachesolr_search.pages.inc
+++ b/apachesolr_search.pages.inc
@@ -12,7 +12,7 @@ function apachesolr_search_custom_page($page_id, $keys = '', $path_replacer = NU
   $search_page = apachesolr_search_page_load($page_id);
   if (empty($search_page)) {
     drupal_set_message(t('This search page cannot be found'), 'error');
-    return drupal_not_found();
+    drupal_not_found();
   }
   // Activate the page context, if the module is enabled.
   if ((module_exists('context')) && ($plugin = context_get_plugin('condition', 'apachesolr_page'))) {
@@ -26,6 +26,22 @@ function apachesolr_search_custom_page($page_id, $keys = '', $path_replacer = NU
   $search_page['search_path'] = str_replace('%', $path_replacer, $search_page['search_path']);
   // Retrieve the conditions that apply to this page
   $conditions = apachesolr_search_conditions_default($search_page);
+
+  // Loading the FacetAPI adapter to see if it's modifying the search criteria
+  $adapter = facetapi_adapter_load('apachesolr@' . $search_page['env_id']);
+  if ($adapter) {
+    // Get the parameters so we can get the query
+    $params = $adapter->getUrlProcessor()->fetchParams();
+    // If we have the query parameter
+    if (isset($params['q'])) {
+      $keywords = $params['q'];
+      // Remove the current search page path
+      $keywords = str_replace($search_page['search_path'], '', $keywords);
+      // And then any extraneous slashes
+      $keys = trim($keywords, '/');
+    }
+  }
+
   // Process our keys so they are clean
   $keys = rawurldecode($keys);
   // Retrieve the results of the search
