Index: image_pub.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image_pub/Attic/image_pub.module,v
retrieving revision 1.11.2.6
diff -u -p -r1.11.2.6 image_pub.module
--- image_pub.module	24 Sep 2008 22:33:28 -0000	1.11.2.6
+++ image_pub.module	2 Oct 2008 20:10:12 -0000
@@ -457,9 +457,8 @@ function _image_pub_gr_fetch_albums($ref
       $pname = 0;
       if (!empty($term->parents[0])) {
         $pterm = _image_pub_album_get($term->parents[0]);
-        $pname = $pterm->tid;
         if ($refnum) {
-          $pname = $aidref[$pname];   // Guaranteed to exist?
+          $pname = $aidref[_image_pub_gr_get_albumname($pterm)];   // Guaranteed to exist?
         } else {
           $pname = _image_pub_gr_get_albumname($pterm);
         }
