Slightly adjusted Disconnect-message-handling.