Fix duplication connections when calling open