fix problem attempting to connect after initially failing to connect