fix KeyError: 'code' when using COUNTRIES_OVERRIDE