Better reconnection handling.