diff --git a/search_api_sorts.theme.inc b/search_api_sorts.theme.inc
index 7a7d3a3..532e4e6 100644
--- a/search_api_sorts.theme.inc
+++ b/search_api_sorts.theme.inc
@@ -28,7 +28,11 @@ function theme_search_api_sorts_list(array $variables) {
  */
 function theme_search_api_sorts_sort(array $variables) {
   $name = $variables['name'];
-  $path = $variables['path'];
+  $path = current_path();
+  if (module_exists('facetapi_pretty_paths')) {
+    $path = ltrim(parse_url(request_uri(), PHP_URL_PATH), '/');
+    unset($_GET['f']);      
+  }
   $options = $variables['options'] + array('attributes' => array());
   $options['attributes'] += array('class' => array());
 
