fixed search connections in both gui and api

I think carl fixed api side issue on another branch