fixed search pagination for more that 2 pages