fixed externalLink check