diff --git a/addressfield.address_formats.inc b/addressfield.address_formats.inc
index 6bcec74..19e7958 100644
--- a/addressfield.address_formats.inc
+++ b/addressfield.address_formats.inc
@@ -122,7 +122,6 @@ function addressfield_get_address_format($country_code) {
     'used_fields' => array('dependent_locality', 'locality', 'administrative_area', 'postal_code'),
     'required_fields' => array('locality', 'administrative_area'),
     'dependent_locality_label' => t('District'),
-    'render_administrative_area_value' => TRUE,
   );
   $address_formats['CO'] = array(
     'used_fields' => array('locality', 'administrative_area', 'postal_code'),
diff --git a/addressfield.feeds.inc b/addressfield.feeds.inc
index 769db4e..062b221 100644
--- a/addressfield.feeds.inc
+++ b/addressfield.feeds.inc
@@ -48,12 +48,12 @@ function addressfield_set_target($source, $entity, $target, $values) {
 
   // If the field is already set on the given entity, update the existing value
   // array. Otherwise start with a fresh field value array.
-  $field = isset($entity->{$field_name}) ? $entity->{$field_name} : array();
+  $field = isset($entity->$field_name) ? $entity->$field_name : array();
 
   // Loop over the field values array...
   foreach ($values as $delta => $value) {
     $field[LANGUAGE_NONE][$delta][$sub_field] = $value;
   }
 
-  $entity->{$field_name} = $field;
+  $entity->$field_name = $field;
 }
diff --git a/addressfield.info b/addressfield.info
index af5d068..89e9515 100644
--- a/addressfield.info
+++ b/addressfield.info
@@ -9,3 +9,10 @@ files[] = addressfield.migrate.inc
 files[] = views/addressfield_views_handler_field_administrative_area.inc
 files[] = views/addressfield_views_handler_field_country.inc
 files[] = views/addressfield_views_handler_filter_country.inc
+
+; Information added by Drupal.org packaging script on 2015-10-07
+version = "7.x-1.2"
+core = "7.x"
+project = "addressfield"
+datestamp = "1444254070"
+
diff --git a/addressfield.migrate.inc b/addressfield.migrate.inc
index f88536b..cc98911 100644
--- a/addressfield.migrate.inc
+++ b/addressfield.migrate.inc
@@ -5,11 +5,6 @@
  * Base integration with the Migrate API class.
  */
 
-// Avoid issues when migrate module is disabled.
-if (!class_exists('MigrateFieldHandler')) {
-  return;
-}
-
 /**
  * Implements hook_migrate_api().
  */
diff --git a/addressfield.module b/addressfield.module
index 68b45d9..25b277d 100644
--- a/addressfield.module
+++ b/addressfield.module
@@ -305,14 +305,7 @@ function theme_addressfield_container($variables) {
   if (strlen($element['#children']) > 0) {
     $output = '<' . $element['#tag'] . drupal_attributes($element['#attributes']) . '>';
     $output .= $element['#children'];
-    $output .= '</' . $element['#tag'] . '>';
-    // Add a linebreak to the HTML after a div. This is invisible on the
-    // rendered page but improves the appearance of address field output when
-    // HTML tags are stripped, such as by Views Data Export.
-    if ($element['#tag'] == 'div') {
-      $output .= PHP_EOL;
-    }
-
+    $output .= '</' . $element['#tag'] . ">";
     return $output;
   }
   else {
@@ -453,7 +446,7 @@ function addressfield_field_presave($entity_type, $entity, $field, $instance, $l
     // spaces to single spaces.
     foreach ($item as $key => &$value) {
       if (!in_array($key, array('data')) && is_string($value)) {
-        $value = trim(preg_replace('/[[:blank:]]{2,}/u', ' ', $value));
+        $value = trim(str_replace('  ', ' ', $value));
       }
     }
   }
diff --git a/addressfield.tokens.inc b/addressfield.tokens.inc
index 10379b8..624d41b 100644
--- a/addressfield.tokens.inc
+++ b/addressfield.tokens.inc
@@ -77,7 +77,6 @@ function addressfield_token_info() {
     'name' => t('Address formatted for MailChimp'),
     'description' => t('The full address formatted for import into MailChimp.'),
   );
-
   return array(
     'types' => array('address-field' => $type),
     'tokens' => array('address-field' => $info),
@@ -90,7 +89,7 @@ function addressfield_token_info() {
 function addressfield_token_info_alter(&$data) {
   // Loop over every address field on the site.
   foreach (array_filter(field_info_field_map(), 'addressfield_field_map_filter') as $field_name => $field) {
-    foreach ($data['tokens'] as $group => $token){
+    foreach ($data['tokens'] as $group => $token) {
       if (isset($data['tokens'][$group][$field_name]) && is_array($data['tokens'][$group][$field_name])) {
         // Set the token type for the field to use the addressfield child tokens.
         $data['tokens'][$group][$field_name]['type'] = 'address-field';
@@ -103,19 +102,18 @@ function addressfield_token_info_alter(&$data) {
  * Implements hook_tokens().
  */
 function addressfield_tokens($type, $tokens, array $data = array(), array $options = array()) {
-  if (isset($options['language'])) {
-    $language_code = $options['language']->language;
-  }
-  else {
-    $language_code = LANGUAGE_NONE;
+  if(isset($data['entity']->language)){
+    $language_code = $data['entity']->language;
   }
+  else  {
+      $language_code = LANGUAGE_NONE;
 
+  }
   $sanitize = !empty($options['sanitize']);
-
   $replacements = array();
-
   // If we're generating tokens for an address field, extract the address data
   // from the field value array and generate the necessary replacements.
+
   if ($type == 'address-field' && !empty($data['address-field'][$language_code]) && is_array($data['address-field'][$language_code])) {
     $address = reset($data['address-field'][$language_code]);
 
@@ -191,7 +189,14 @@ function addressfield_tokens($type, $tokens, array $data = array(), array $optio
         case 'format-mailchimp':
           $components = array();
 
-          foreach (array('thoroughfare', 'premise', 'locality', 'administrative_area', 'postal_code', 'country') as $component) {
+          foreach (array(
+                     'thoroughfare',
+                     'premise',
+                     'locality',
+                     'administrative_area',
+                     'postal_code',
+                     'country'
+                   ) as $component) {
             if (!empty($address[$component])) {
               $components[] = $address[$component];
             }
@@ -202,6 +207,89 @@ function addressfield_tokens($type, $tokens, array $data = array(), array $optio
           break;
       }
     }
+    $addresses = $data['address-field'][$language_code];
+    if (count($addresses) != 1) {
+      foreach ($addresses as $key => $address) {
+
+        $values[$key] = $address;
+        foreach ($tokens as $name => $original) {
+          switch ($name) {
+            case $key . ':country':
+              //dsm($tokens);
+              //
+              if(isset($tokens[$key])){
+                $replacements[$original] = $sanitize ? check_plain(join(" ", $values[$key])) : join(" ", $values[$key]);
+              }
+              else {
+                $countries = _addressfield_country_options_list();
+                $replacements[$original] = $sanitize ? check_plain($countries[$values[$key]['country']]) : $countries[$values[$key]['country']];
+              }
+              break;
+
+            case $key . ':country-code':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['country']) : $values[$key]['country'];
+              break;
+
+            case $key . ':administrative-area':
+              // If we received format handlers in the data array, generate the form
+              // for the address field to see if the administrative area should be
+              // expanded from an abbreviation to a related name.
+              $administrative_area = $values[$key]['administrative_area'];
+
+              if (!empty($data['format_handlers'])) {
+                $form = addressfield_generate($address, $data['format_handlers'], array('mode' => 'form'));
+
+                if (!empty($form['locality_block']['administrative_area']['#options'][$administrative_area])) {
+                  $administrative_area = $form['locality_block']['administrative_area']['#options'][$administrative_area];
+                }
+              }
+
+              $replacements[$original] = $sanitize ? check_plain($administrative_area) : $administrative_area;
+              break;
+
+            case $key . ':administrative-area-raw':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['administrative_area']) : $values[$key]['administrative_area'];
+              break;
+
+            case $key . ':locality':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['locality']) : $values[$key]['locality'];
+              break;
+
+            case $key . ':postal-code':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['postal_code']) : $values[$key]['postal_code'];
+              break;
+
+            case $key . ':thoroughfare':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['thoroughfare']) : $values[$key]['thoroughfare'];
+              break;
+
+            case $key . ':premise':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['premise']) : $values[$key]['premise'];
+              break;
+
+            case $key . ':sub_premise':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['sub_premise']) : $address['sub_premise'];
+              break;
+
+            case $key . ':organisation':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['organisation_name']) : $address['organisation_name'];
+              break;
+
+            case $key . ':name-line':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['name_line']) : $values[$key]['name_line'];
+              break;
+
+            case $key . ':first-name':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['first_name']) : $values[$key]['first_name'];
+              break;
+
+            case $key . ':last-name':
+              $replacements[$original] = $sanitize ? check_plain($values[$key]['last_name']) : $values[$key]['last_name'];
+              break;
+          }
+        }
+      }
+    }
   }
 
   // The Token module extends direct token generation by using a generic entity
@@ -225,7 +313,10 @@ function addressfield_tokens($type, $tokens, array $data = array(), array $optio
 
         if (property_exists($data['entity'], $field_name)) {
           // Generate the necessary address field tokens for the entity.
-          $replacements += token_generate('address-field', $addressfield_tokens, array('address-field' => $data['entity']->$field_name, 'format_handlers' => $format_handlers), $options);
+          $replacements += token_generate('address-field', $addressfield_tokens, array(
+            'address-field' => $data['entity']->$field_name,
+            'format_handlers' => $format_handlers
+          ), $options);
         }
       }
     }
diff --git a/example/addressfield_example.info b/example/addressfield_example.info
index f39e482..b0f1982 100644
--- a/example/addressfield_example.info
+++ b/example/addressfield_example.info
@@ -6,3 +6,10 @@ hidden = TRUE
 
 dependencies[] = ctools
 dependencies[] = addressfield
+
+; Information added by Drupal.org packaging script on 2015-10-07
+version = "7.x-1.2"
+core = "7.x"
+project = "addressfield"
+datestamp = "1444254070"
+
diff --git a/plugins/format/address-hide-country.inc b/plugins/format/address-hide-country.inc
index 59881fb..13ebd1c 100644
--- a/plugins/format/address-hide-country.inc
+++ b/plugins/format/address-hide-country.inc
@@ -20,7 +20,7 @@ $plugin = array(
 function addressfield_format_address_hide_country(&$format, $address, $context = array()) {
   // Hide the country element only if the whole field is required, otherwise
   // there will always be an additional None option.
-  if ($context['mode'] == 'form' && (empty($context['instance']) || $context['instance']['required'])) {
+  if ($context['mode'] == 'form' && $context['instance']['required']) {
     if (!empty($format['country']['#options']) && count($format['country']['#options']) == 1) {
       $format['country']['#access'] =  FALSE;
     }
