fixed nil error when no connections are found in networks