fixing search pagination