--- ./og_forum.module.orig	2009-08-18 18:43:14.000000000 +0200
+++ ./og_forum.module	2009-08-18 22:37:53.000000000 +0200
@@ -409,7 +409,7 @@
       }
       return $return;
     }
-    if (arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'forum' && !$_GET['gids']) {
+    if (arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'forum' && empty($_GET['gids'])) {
       $return['join'] = "LEFT JOIN {og_term} ogt ON t.tid = ogt.tid";
       $return['where'] = "ogt.nid IS NULL";
       if ($og_forum_container = variable_get('forum_default_container', FALSE)) {
@@ -826,8 +826,8 @@
         $group = og_get_group_context();
       }
     }
-    $GID = $group->nid; 
-    if ($GID) {  
+    if (isset($group->nid)) {
+      $GID = $group->nid;
       $results = db_query('SELECT ot.tid, th.parent FROM {og_term} ot LEFT JOIN {term_hierarchy} th ON ot.tid = th.tid WHERE nid = %d ORDER BY tid ASC', $GID);
       while ($result = db_fetch_object($results)) {
         $all_results[$result->tid] = $result->parent;
