Added disconnect detection and correct messaging to clients