Added duplicate connection prevention