fixed secondary connection bug