diff --git a/flexifield-widget.inc b/flexifield-widget.inc
index 4bf388d..aadc11f 100644
--- a/flexifield-widget.inc
+++ b/flexifield-widget.inc
@@ -84,12 +84,24 @@ function _flexifield_alter_multiple_values_form_process($aElement) {
   // Solve AHAH.
   $sId = $aElement['#id'];
   $sKeyAddMore = $aElement['#field_name'] . '_add_more';
+  
   if (isset($aElement[$sKeyAddMore])) {
     $aElement['#prefix'] = '<div id="'. $sId .'-items">';
     $aElement[$sKeyAddMore]['#ahah']['wrapper'] = $sId . '-items';
     $aPathParts = explode('/', $aElement[$sKeyAddMore]['#ahah']['path']);
+    
+    //bug fix for flexi field with flexi field
+    if( $aPathParts[2] == 'addmore' ) {
+      unset($aPathParts[2]);
+      $aPathParts = array_values($aPathParts);
+      $aPathParts[2] = str_replace('-','_',$aPathParts[2]);
+    }
+    
+    //drupal_set_message( p($aPathParts,true) );
     $aElement[$sKeyAddMore]['#ahah']['path'] = implode('/', array_merge(array('flexifield/ahah/addmore'), array_slice($aPathParts, 2, 2), array(implode(':', $aElement['#array_parents']), implode(':', $aElement['#parents']))));
+    //drupal_set_message('<br />path::'.$aElement[$sKeyAddMore]['#ahah']['path']);    
   }
+  
   return $aElement;
 }
 
@@ -239,8 +251,10 @@ function flexifield_ahah_changetype($sElementParents = NULL) {
  * Used for both flexifields and fields within flexifield.
  */
 function flexifield_ahah_addmore($sTypeNameUrl, $sFieldName, $sParents, $sDataParents) {  
-  $aParents = explode(':', $sParents);
+  
+  $aParents = explode(':', $sParents);      
   while (array_pop($aParents) != $sFieldName) {}
+    
   $aDataParents = explode(':', $sDataParents);
   while (array_pop($aDataParents) != $sFieldName) {}
   
diff --git a/flexifield.module b/flexifield.module
index 63a57c2..5186036 100644
--- a/flexifield.module
+++ b/flexifield.module
@@ -469,11 +469,20 @@ function flexifield_widget_info() {
       'label' => t('Default Widget for Flexi-Field'),
       'field types' => array('flexifield'),
       'multiple values' => CONTENT_HANDLE_MODULE,
+      'callbacks' => array('default value' => CONTENT_CALLBACK_CUSTOM),
     ),
   );
 }
 
 /**
+ * Implementation of CCK's hidden hook_WIDGET_NAME_default_value().
+ */
+function flexifield_default_widget_default_value(&$form, &$form_state, $field, $delta) {
+  // We add a dummy function to keep cck from populating new flexifields with
+  // blank items.
+}
+
+/**
  * Implementation of FAPI hook_elements().
  */
 function flexifield_elements() {
@@ -548,6 +557,17 @@ function flexifield_widget(&$form, &$form_state, $field, $items, $delta = NULL)
   // to make adjustments to what content_multiple_value_form() does.
   else {
     $bReturnSingleItem = TRUE;
+    
+    // Keep extra blank items from getting added to flexifields with values.
+    // We set the item_count flag in $form_state in order to override cck's
+    // default behavior in content_multiple_value_form(). When the form is
+    // submitted by the 'Add another item' button, we see the flag and allow
+    // the item count to increment normally.
+    $item_count = count($items);
+    $form_state['item_count'][$field['field_name']] = (isset($form_state['item_count'][$field['field_name']]))
+      ? $item_count + 1
+      : (($item_count) ? $item_count - 1 : 0);
+
     $element = content_multiple_value_form($form, $form_state, $field, $items);
     $bReturnSingleItem = FALSE;
     module_load_include('inc', 'flexifield', 'flexifield-widget');
