fix duplicate connections