fix sql search