diff --git a/includes/webform.components.inc b/includes/webform.components.inc
index 833aad1..72ce47c 100644
--- a/includes/webform.components.inc
+++ b/includes/webform.components.inc
@@ -710,6 +710,10 @@ function webform_component_insert(&$component) {
     }
   }
 
+  if (empty($component['pid'])) {
+    $component['pid'] = 0;
+  }
+
   $query = db_insert('webform_component')
     ->fields(array(
       'nid' => $component['nid'],
