fix a fatal defect of returning duplicate connection