diff --git sites/all/modules/autoassignrole/autoassignrole.module sites/all/modules/autoassignrole/autoassignrole.module
index f3cba45..0724a3e 100644
--- sites/all/modules/autoassignrole/autoassignrole.module
+++ sites/all/modules/autoassignrole/autoassignrole.module
@@ -423,6 +423,37 @@ function autoassignrole_form_alter(&$form, $form_state, $form_id) {
             foreach($node_form['#field_info'] as $field_name => $info) {
               unset($form[$field_name]);
             }
+          }
+        }
+        // content_profile_registration module inserts 
+        // for each new registration new profile types
+        // we want to insert just the needed ones
+        // see http://drupal.org/node/337423
+        if($profile_types) {
+          $form['#validate'][] = 'autoassignrole_user_register_validate';
+        }
+      }
+    }
+  }
+}
+
+
+/**
+ * Validates the user registration form
+ */
+function autoassignrole_user_register_validate($form, &$form_state) {
+  if(module_exists('content')  && module_exists('content_profile')) {
+    $path = drupal_get_path_alias($_GET['q']);
+    if($path != '/user/register') {
+      $page = db_fetch_object(db_query("SELECT rid FROM {autoassignrole_page} WHERE path = '%s'", $path));
+      if(isset($page->rid)) {
+        foreach (content_profile_get_types('names', 'registration_use') as $type => $typename) {
+          $enabled = variable_get('autoassignrole_content_profile_'. $type, 0);
+          if($enabled != $page->rid && isset($form_state['content_profile_registration'][$type])) {
+            unset($form_state['content_profile_registration'][$type]);
           }
         }
       }
