Improved country matching to avoid invalid countries
Do not process invalid countries