diff --git a/Tools/AGSHtml.m b/Tools/AGSHtml.m
index f257ad455..c6091cb02 100644
--- a/Tools/AGSHtml.m
+++ b/Tools/AGSHtml.m
@@ -731,7 +731,7 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
[buf appendString: indent];
[buf appendString: @"
"];
s = [self makeLink: sel ofType: @"method" inUnit: nil isRef: NO];
- if (s == nil)
+ if (s != nil)
{
[buf appendString: s];
[buf appendString: [sel substringFromIndex: 1]];
@@ -1222,7 +1222,8 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
{
[buf appendString: indent];
[buf appendString: @"
"];
- [buf appendString: [self makeLink: s ofType: @"method" isRef: YES]];
+ [buf appendString:
+ [self makeLink: s ofType: @"method" inUnit: unit isRef: YES]];
[buf appendString: s];
[buf appendString: @"\n"];
}
diff --git a/Tools/AGSIndex.m b/Tools/AGSIndex.m
index 09f58f361..7373e4181 100644
--- a/Tools/AGSIndex.m
+++ b/Tools/AGSIndex.m
@@ -453,7 +453,7 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
t = [refs objectForKey: type];
t = [t objectForKey: ref];
- return [t objectForKey: unit];
+ return [t objectForKey: u];
}
@end