fix search and search pagination