Fixes query.limit and query.reverse.