diff --git a/addressfield.module b/addressfield.module
index c010514..5bb70e2 100644
--- a/addressfield.module
+++ b/addressfield.module
@@ -180,12 +180,15 @@ function addressfield_process_format_form($format, &$form_state, $complete_form)
 }
 
 function _addressfield_process_format_form(&$format, $address, $required) {
+  // Create a list of available address fields
+  $address_fields = array_keys($address);
+
   foreach (element_children($format) as $key) {
     $child = &$format[$key];
 
     // Automatically convert any element in the format array to an appropriate
     // form element that matches one of the address component names.
-    if (in_array($key, array('name_line', 'first_name', 'last_name', 'organisation_name', 'country', 'administrative_area', 'sub_administrative_area', 'locality', 'dependent_locality', 'postal_code', 'thoroughfare', 'premise', 'sub_premise'))) {
+    if (in_array($key, $address_fields, TRUE)) {
       // Set the form element type for the address component to whatever the
       // address format specified in its #widget_type property.
       if (isset($child['#widget_type'])) {
@@ -228,12 +231,15 @@ function addressfield_render_address($format) {
 }
 
 function _addressfield_render_address(&$format, $address) {
+  // Create a list of available address fields
+  $address_fields = array_keys($address);
+
   foreach (element_children($format) as $key) {
     $child = &$format[$key];
 
     // Automatically expand elements that match one of the fields of the address
     // structure.
-    if (in_array($key, array('name_line', 'first_name', 'last_name', 'organisation_name', 'country', 'administrative_area', 'sub_administrative_area', 'locality', 'dependent_locality', 'postal_code', 'thoroughfare', 'premise', 'sub_premise'), TRUE)) {
+    if (in_array($key, $address_fields, TRUE)) {
       if (isset($child['#render_type'])) {
         $child['#type'] = $child['#render_type'];
       }
