Fixed disconnect on application stop.