updated locations index controller to fix search error