fix bugs for searching api