Better reconnection handling