diff --git a/storm.module b/storm.module
index 3e3238e..1eccace 100644
--- a/storm.module
+++ b/storm.module
@@ -1047,6 +1047,7 @@ function storm_get_assignment_options($organization_nid = 0, $project_nid = 0) {
           if (module_exists('stormteam')) {
             $options[$teams][$node->nid] = check_plain($node->title);
             foreach ($node->members_array as $nid => $name) {
+              // do not add deactivated persons
               if (!array_key_exists($nid, $node->members_deactivated_array)) {
                 $options[$people][$nid] = check_plain($name);
               }
@@ -1091,32 +1092,35 @@ function storm_get_assignment_options($organization_nid = 0, $project_nid = 0) {
     }
   }
   if (module_exists('stormteam')) {
-    $sql = "SELECT DISTINCT(n.nid)
+    $where = array();
+    $args = array();
+    $having = "";
+    // do not add teams, which we already added
+    if (!empty($options[$teams])) {
+      $where[] = "ste.nid NOT IN (".db_placeholders($options[$teams]).")";
+      $args = array_merge($args, array_keys($options[$teams]));
+    }
+    // only add teams, which have at least the same members as persons we added so far
+    if (!empty($organization_nid) && !empty($options[$people])) {
+      // add all persons which should be in the team
+      $where[] = "ste.mnid IN (".db_placeholders($options[$people]).")";
+      $args = array_merge($args, array_keys($options[$people]));
+      // add a count, how many of the given persons should be in the other teams
+      $having = " HAVING COUNT(ste.nid) = %d ";
+      $args[] = count($options[$people]);
+    }
+    $sql = "SELECT n.nid, n.vid, n.title
                 FROM {node} n
                 INNER JOIN {stormteam} ste
                   ON n.vid = ste.vid
                 WHERE n.type = 'stormteam'
+                GROUP BY ste.nid".$having."
                 ORDER BY n.title ASC";
-    $sql = stormteam_access_sql($sql);
+    $sql = stormteam_access_sql($sql, $where);
     $sql = db_rewrite_sql($sql);
-    $result = db_query($sql);
+    $result = db_query($sql, $args);
     while ($team = db_fetch_object($result)) {
-      if (!array_key_exists($team->nid, $options[$teams])) {
-        $team_node = node_load($team->nid);
-        $add_team = TRUE;
-        if (isset($organization_nid)) {
-          //Check if all team members are relevant to current org or project
-          foreach ($team_node->members_array as $nid => $name) {
-            if (!array_key_exists($nid, $options[$people])) {
-              $add_team = FALSE;
-              break;
-            }
-          }
-        }
-        if ($add_team) {
-          $options[$teams][$team_node->nid] = check_plain($team_node->title);
-        }
-      }
+      $options[$teams][$team->nid] = check_plain($team->title);
     }
   }
   if (isset($options[$people]) && array_key_exists(0, $options[$people])) {
diff --git a/stormteam/stormteam.module b/stormteam/stormteam.module
index 1848e97..b1c5999 100644
--- a/stormteam/stormteam.module
+++ b/stormteam/stormteam.module
@@ -337,15 +337,14 @@ function stormteam_form(&$node) {
  * Implementation of hook_load
  */
 function stormteam_load($node) {
-  $result = db_query('SELECT mnid FROM {stormteam} WHERE vid = %d', $node->vid);
+  $result = db_query('SELECT ste.mnid, n.title, n.status FROM {stormteam} ste JOIN {node} n ON (ste.mnid = n.nid) WHERE ste.vid = %d', $node->vid);
   $additions = new stdClass();
+  $additions->members_array = array();
+  $additions->members_deactivated_array = array();
   while ($members = db_fetch_object($result)) {
-    $mnode = node_load($members->mnid);
-    if (!empty($mnode)) {
-      $additions->members_array[$members->mnid] = $mnode->title;
-      if ($mnode->status == 0) {
-        $additions->members_deactivated_array[$members->mnid] = $mnode->title;
-      }
+    $additions->members_array[$members->mnid] = $members->title;
+    if ($members->status == 0) {
+      $additions->members_deactivated_array[$members->mnid] = $members->title;
     }
   }
   $additions->title_old = $node->title;
diff --git a/stormteam/stormteam.theme.inc b/stormteam/stormteam.theme.inc
index dde356c..4ffa03b 100644
--- a/stormteam/stormteam.theme.inc
+++ b/stormteam/stormteam.theme.inc
@@ -43,7 +43,6 @@ function theme_stormteam_view($node, $teaser = FALSE, $page = FALSE) {
       '#prefix' => '<div class="members">',
       '#suffix' => '</div>',
       '#value' => theme('storm_view_item', t('Members'), implode(", ", $node->members_array)),
-      '#weight' => $w++,
     );
   }
   
