diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 66ab2296769ffa334d820d697d41c692324015d7..a846d35b323eec3dc9722744653332c37b4b126c 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -664,12 +664,12 @@ function _profile_form_explanation($field) {
 
 function profile_form_profile($edit, $user, $category, $register = FALSE) {
   $result = _profile_get_fields($category, $register);
-  $w = 0;
+  $weight = 1;
   $fields = array();
   while ($field = db_fetch_object($result)) {
     $category = $field->category;
     if (!isset($fields[$category])) {
-      $fields[$category] = array('#type' => 'fieldset', '#title' => $category, '#weight' => $w++);
+      $fields[$category] = array('#type' => 'fieldset', '#title' => $category, '#weight' => $weight++);
     }
     switch ($field->type) {
       case 'textfield':