Fixed configuration for external AD

I'd use `unless ($externalADMode)` or switch the condition.