diff --git a/webform_features.module b/webform_features.module
index 70e0b4f..4b0ec08 100644
--- a/webform_features.module
+++ b/webform_features.module
@@ -154,8 +154,10 @@ function webform_features_component_machine_name_load($name, $reset = FALSE) {
  * Adds the machine name in the webform_component table.
  */
 function webform_features_webform_component_insert($component) {
+  $machine_name = isset($component['form_key']) && !isset($component['machine_name']) ? $component['form_key'] : $component['machine_name'];
+
   db_update('webform_component')
-    ->fields(array('machine_name' => $component['machine_name']))
+    ->fields(['machine_name' => $machine_name])
     ->condition('cid', $component['cid'])
     ->condition('nid', $component['nid'])
     ->execute();
