diff --git a/include/client/tickets.inc.php b/include/client/tickets.inc.php
index fef80c6008f3bae8555da341d00dd55a237e316e..cf3c5e1d92d1c83fd9b02a9bea18bc12f7e3470e 100644
--- a/include/client/tickets.inc.php
+++ b/include/client/tickets.inc.php
@@ -95,10 +95,12 @@ if ($settings['keywords']) {
         $tickets->filter(array('number__startswith'=>$q));
     } else { //Deep search!
         // Use the search engine to perform the search
-        $tickets = $ost->searcher->find($q, $tickets)->distinct('ticket_id');
+        $tickets = $ost->searcher->find($q, $tickets);
     }
 }
 
+$tickets->distinct('ticket_id');
+
 TicketForm::ensureDynamicDataView();
 
 $total=$tickets->count();