Logic fix for extension validation