fixed search page and sql