diff --git a/lib/thinking_sphinx/middlewares.rb b/lib/thinking_sphinx/middlewares.rb
index <HASH>..<HASH> 100644
--- a/lib/thinking_sphinx/middlewares.rb
+++ b/lib/thinking_sphinx/middlewares.rb
@@ -13,8 +13,8 @@ module ThinkingSphinx::Middlewares
   BASE_MIDDLEWARES = [SphinxQL, Geographer, Inquirer]
 
   DEFAULT = ::Middleware::Builder.new do
-    ThinkingSphinx::Middlewares.use self, BASE_MIDDLEWARES
     use StaleIdFilter
+    ThinkingSphinx::Middlewares.use self, BASE_MIDDLEWARES
     use UTF8
     use ActiveRecordTranslator
     use StaleIdChecker
The order of middlewares is quite important.