fix datalink loss detection logic