Added basic handling of clients getting disconnected.