diff --git a/GSWeb/GSWContext.m b/GSWeb/GSWContext.m
index d5ffb3d..bbe6ae9 100644
--- a/GSWeb/GSWContext.m
+++ b/GSWeb/GSWContext.m
@@ -530,7 +530,7 @@ GSWEB_EXPORT BOOL GSWContext_isSenderIDSearchOver(GSWContext* aContext)
     @"50.", @"51.", @"52.", @"53.", @"54.", @"55.", @"56.", @"57.", @"58.", @"59.", 
     @"60.", @"61.", @"62.", @"63.", @"64.", @"65.", @"66.", @"67.", @"68.", @"69." };
   static int preBuiltNumPlusDotCount = sizeof(preBuiltNumPlusDot)/sizeof(NSString*);
-  if (_contextID>=0 && _contextID<preBuiltNumPlusDotCount)
+  if (_contextID<preBuiltNumPlusDotCount)
     {
       if (_elementID)
         return [preBuiltNumPlusDot[_contextID] stringByAppendingString:
diff --git a/GSWeb/GSWDeclarationParser.m b/GSWeb/GSWDeclarationParser.m
index fce00fe..d62bec9 100644
--- a/GSWeb/GSWDeclarationParser.m
+++ b/GSWeb/GSWDeclarationParser.m
@@ -462,7 +462,7 @@ inline GSWDeclaration* parseDeclaration(GSWDeclarationParser* parser)
         {
           [_string getCharacters:_uniBuf];
       
-          NSDebugMLog(@"index=%d length=%d",index,_length);
+          NSDebugMLog(@"index=%d length=%d",_index,_length);
           //ParserDebugLogBuffer(_uniBuf,_length,_index,_length);
           
           while(_index<_length)
@@ -644,7 +644,7 @@ inline GSWDeclaration* parseDeclaration(GSWDeclarationParser* parser)
           [GSWDeclarationFormatException 
             raise:GSWDFEMissingPragmaDelegate
             format:@"In %@ %@: No pragma delegate for pragma directive '%@'",
-            _frameworkName,_fileName];
+            _frameworkName,_fileName,pragmaDirective];
         }
       else
         {
@@ -669,8 +669,8 @@ inline GSWDeclaration* parseDeclaration(GSWDeclarationParser* parser)
     {
       [GSWDeclarationFormatException 
         raise:GSWDFEUnknownPragmaDirective
-        format:@"In %@ %@: Unknown pragma directive '%@' at line %@",
-        _frameworkName,_fileName,
+        format:@"In %@ %@: Unknown pragma directive '%@' at line %d",
+        _frameworkName,_fileName,pragmaDirective,
         [self lineIndexFromIndex:startIndex]];
     };
   //ParserDebugLogBuffer(_uniBuf,_length,_index,_length);
@@ -1245,7 +1245,7 @@ Returns a NSString
                 {
                   [GSWDeclarationFormatException 
                     raise:GSWDFEUnexpectedBufferEnd
-                    format:@"In %@ %@: Reached buffer end while trying to parse value of a dictionary entry",
+                    format:@"In %@ %@: Reached buffer end while trying to parse value of a dictionary entry at line %d",
                     _frameworkName,_fileName,
                     [self lineIndexFromIndex:keyStartIndex]];
                 }
@@ -1260,7 +1260,7 @@ Returns a NSString
                     {
                       [GSWDeclarationFormatException 
                         raise:GSWDFEUnexpectedBufferEnd
-                        format:@"In %@ %@: Reached buffer end while trying to parse value of a dictionary entry",
+                        format:@"In %@ %@: Reached buffer end while trying to parse value of a dictionary entry at line %d",
                         _frameworkName,_fileName,
                         [self lineIndexFromIndex:keyStartIndex]];
                     }
diff --git a/GSWeb/GSWMultiKeyDictionary.m b/GSWeb/GSWMultiKeyDictionary.m
index 2649be5..bb82435 100644
--- a/GSWeb/GSWMultiKeyDictionary.m
+++ b/GSWeb/GSWMultiKeyDictionary.m
@@ -979,6 +979,9 @@ static void GSWMapBaseInitWithZoneAndCapacity(GSWMapBase base,
   GSWMultiKeyDictionary* _dictionary;
   NSMutableArray* _objects;
 }
+
+-(id)initWithDictionary:(GSWMultiKeyDictionary*)d;
+
 @end
 
 //==============================================================================
@@ -1431,7 +1434,7 @@ static void GSWMapBaseInitWithZoneAndCapacity(GSWMapBase base,
 {
   return AUTORELEASE([[GSWMultiKeyDictionaryObjectEnumerator 
                         allocWithZone:NSDefaultMallocZone()] 
-                       initWithDictionary: (NSDictionary*)self]);
+                       initWithDictionary: self]);
 }
 
 //------------------------------------------------------------------------------
@@ -1501,7 +1504,7 @@ static void GSWMapBaseInitWithZoneAndCapacity(GSWMapBase base,
   if ((self=[super init]))
     {
       ASSIGN(_dictionary,((GSWMultiKeyDictionary*)d));
-      ASSIGN(_objects,[_dictionary allValues]);
+      ASSIGN(_objects,((NSMutableArray *)[_dictionary allValues]));
     };
   return self;
 }
