Improve robustness of connection failure