Readded disconnection handling.