Fix empty connections check