Reconnect with better error handling.