#306 Fix pagination for search