Add watches for disconnected applications and clients; fix related issues