diff -urp modules/profile_orig/profile.admin.inc modules/profile_fieldupdate/profile.admin.inc
--- modules/profile_orig/profile.admin.inc	2009-05-26 09:41:06.000000000 +0000
+++ modules/profile_fieldupdate/profile.admin.inc	2009-07-21 11:48:05.000000000 +0000
@@ -315,7 +315,7 @@ function profile_field_form_validate($fo
   $query->fields('profile_field', array('fid'));
 
   if (isset($form_state['values']['fid'])) {
-    $query->condition('fid', $form_state['values']['fid']);
+    $query->condition('fid', $form_state['values']['fid'], '<>');
   }
   $query_name = clone $query;
 
@@ -354,9 +354,9 @@ function profile_field_form_submit($form
   if (!isset($form_state['values']['page'])) {
     $form_state['values']['page'] = '';
   }
+  // Remove all elements that are not profile_field columns.
+  $values = array_intersect_key($form_state['values'], array_flip(array('type', 'category', 'title', 'name', 'explanation', 'visibility', 'page', 'weight', 'autocomplete', 'required', 'register', 'options')));
   if (!isset($form_state['values']['fid'])) {
-    // Remove all elements that are not profile_field columns.
-    $values = array_intersect_key($form_state['values'], array_flip(array('type', 'category', 'title', 'name', 'explanation', 'visibility', 'page', 'weight', 'autocomplete', 'required', 'register', 'options')));
     db_insert('profile_field')
       ->fields($values)
       ->execute();
@@ -365,9 +365,9 @@ function profile_field_form_submit($form
   }
   else {
     db_update('profile_field')
-      ->fields($form_state['values'])
+      ->fields($values)
       ->condition('fid', $form_state['values']['fid'])
-      ->exeucte();
+      ->execute();
     drupal_set_message(t('The field has been updated.'));
   }
   cache_clear_all();
diff -urp modules/profile_orig/profile.test modules/profile_fieldupdate/profile.test
--- modules/profile_orig/profile.test	2009-07-13 20:51:12.000000000 +0000
+++ modules/profile_fieldupdate/profile.test	2009-07-21 11:52:08.000000000 +0000
@@ -68,6 +68,50 @@ class ProfileTestCase extends DrupalWebT
   }
 
   /**
+   * Update a profile field.
+   *
+   * @param $field
+   *   The field that should be updated.
+   * @return
+   *   Array representation of the updated field.
+   */
+   
+  function updateProfileField($field) {
+    $edit['title'] = $title = $this->randomName(8);
+    $edit['name'] = $form_name = $field['form_name'];
+    $edit['category'] = $category = $field['category'];
+    $edit['explanation'] = $this->randomName(50);
+
+    $this->drupalPost('admin/user/profile/edit/' . $field['fid'], $edit, t('Save field'));
+
+    // Check that the updated field is appearing on the user edit form.
+    $this->drupalGet('user/' . $this->admin_user->uid . '/edit/' . $category);
+
+    // Checking field.
+    if ($field['type'] == 'date') {
+      $this->assertField($form_name . '[month]', t('Found month selection field'));
+      $this->assertField($form_name . '[day]', t('Found day selection field'));
+      $this->assertField($form_name . '[year]', t('Found day selection field'));
+    }
+    else {
+      $this->assertField($form_name , t('Found form named @name', array('@name' => $form_name)));
+    }
+
+    // Checking name.
+    $this->assertText($title, t('Checking updated title for field %title', array('%title' => $title)));
+    // Checking explanation.
+    $this->assertText($edit['explanation'], t('Checking updated explanation for field %title', array('%title' => $title)));
+
+    return array(
+      'fid' => $field['fid'],
+      'type' => $field['type'],
+      'form_name' => $form_name,
+      'title' => $title,
+      'category' => $category,
+    );
+  }
+
+  /**
    * Set the profile field to a random value
    *
    * @param $field
@@ -117,7 +161,7 @@ class ProfileTestFields extends ProfileT
   public static function getInfo() {
     return array(
       'name' => 'Test single fields',
-      'description' => 'Testing profile module with add/edit/delete textfield, textarea, list, checkbox, and url fields into profile page',
+      'description' => 'Testing profile module with add/edit/update/delete textfield, textarea, list, checkbox, and url fields into profile page',
       'group' => 'Profile'
     );
   }
@@ -140,10 +184,12 @@ class ProfileTestFields extends ProfileT
       'url' => 'http://www.' . str_replace('_', '', $this->randomName(10)) . '.org',
     );
 
-    // For each field type, create a field, give it a value and delete the field.
+    // For each field type, create a field, give it a value, update it 
+    // and delete the field.
     foreach ($field_types as $type => $value) {
       $field = $this->createProfileField($type);
       $this->setProfileField($field, $value);
+      $field = $this->updateProfileField($field);
       $this->deleteProfileField($field);
     }
   }
@@ -153,13 +199,13 @@ class ProfileTestSelect extends ProfileT
   public static function getInfo() {
     return array(
       'name' => 'Test select field',
-      'description' => 'Testing profile module with add/edit/delete a select field',
+      'description' => 'Testing profile module with add/edit/update/delete a select field',
       'group' => 'Profile'
     );
   }
 
   /**
-   * Create a list selection field, give it a value, and delete the field.
+   * Create a list selection field, give it a value, update it and delete the field.
    */
   function testProfileSelectionField() {
     $this->drupalLogin($this->admin_user);
@@ -171,6 +217,8 @@ class ProfileTestSelect extends ProfileT
 
     $this->setProfileField($field, rand(1, 10));
 
+    $field = $this->updateProfileField($field);
+
     $this->deleteProfileField($field);
   }
 }
@@ -179,13 +227,13 @@ class ProfileTestDate extends ProfileTes
   public static function getInfo() {
     return array(
       'name' => 'Test date field',
-      'description' => 'Testing profile module with add/edit/delete a date field',
+      'description' => 'Testing profile module with add/edit/update/delete a date field',
       'group' => 'Profile'
     );
   }
 
   /**
-   * Create a date field, give it a value, and delete the field.
+   * Create a date field, give it a value, update it and delete the field.
    */
   function testProfileDateField() {
     $this->drupalLogin($this->admin_user);
@@ -208,6 +256,8 @@ class ProfileTestDate extends ProfileTes
 
     $this->assertText('01/09/1983', t('Found date profile field.'));
 
+    $field = $this->updateProfileField($field);
+
     $this->deleteProfileField($field);
   }
 }
