Fixed up search endpoint