Fix search query on pagination