Searching and pagination now work together