Index: og_user_roles.module
===================================================================
--- og_user_roles.module	(revision 2928)
+++ og_user_roles.module	(working copy)
@@ -1954,7 +1954,7 @@
   if ($gid02 === NULL) {
     $gid = 0;
   }else{
-    if (isset($_SESSION['og_last'])) $_SESSION['og_last'] = $group_node;
+    if (isset($_SESSION['og_last'])) $_SESSION['og_last'] = gid02;
     $_SESSION['og_user_role'] = $gid;
   }
 
@@ -3909,4 +3909,4 @@
 
 }
 
-?>
\ No newline at end of file
+?>
