Index: nodewords_basic/nodewords_basic.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodewords/nodewords_basic/nodewords_basic.module,v
retrieving revision 1.1.2.42
diff -u -p -r1.1.2.42 nodewords_basic.module
--- nodewords_basic/nodewords_basic.module	23 Nov 2009 09:44:01 -0000	1.1.2.42
+++ nodewords_basic/nodewords_basic.module	26 Nov 2009 17:53:17 -0000
@@ -70,7 +70,7 @@ function nodewords_basic_nodewords_tags_
       'tag:db:type' => 'string',
       'tag:function:prefix' => 'nodewords_basic_copyright',
       'tag:template' => array('copyright' => NODEWORDS_META),
-      'tag:template:index' => '<h3>%content</h3>',
+      'tag:template:index' => array('copyright' => '<h3>%content</h3>'),
       'tag:weight' => array('copyright' => -7),
       'widget:label' => t('Copyright'),
       'widget:permission' => 'edit meta tag COPYRIGHT',
@@ -79,7 +79,7 @@ function nodewords_basic_nodewords_tags_
       'tag:db:type' => 'string',
       'tag:function:prefix' => 'nodewords_basic_description',
       'tag:template' => array('description' => NODEWORDS_META),
-      'tag:template:index' => '<h3>%content</h3>',
+      'tag:template:index' => array('description' => '<h3>%content</h3>'),
       'tag:weight' => array('description' => -6),
       'widget:label' => t('Description'),
       'widget:permission' => 'edit meta tag DESCRIPTION',
@@ -88,7 +88,7 @@ function nodewords_basic_nodewords_tags_
       'tag:db:type' => 'string',
       'tag:function:prefix' => 'nodewords_basic_keywords',
       'tag:template' => array('keywords' => NODEWORDS_META),
-      'tag:template:index' => '<h2>%content</h2>',
+      'tag:template:index' => array('keywords' => '<h2>%content</h2>'),
       'tag:weight' => array('keywords' => -8),
       'widget:label' => t('Keywords'),
       'widget:permission' => 'edit meta tag KEYWORDS',
Index: nodewords.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodewords/nodewords.admin.inc,v
retrieving revision 1.1.2.108
diff -u -p -r1.1.2.108 nodewords.admin.inc
--- nodewords.admin.inc	23 Nov 2009 08:28:09 -0000	1.1.2.108
+++ nodewords.admin.inc	26 Nov 2009 17:53:17 -0000
@@ -134,12 +134,13 @@ function nodewords_pages_overview_submit
  */
 function nodewords_pages_edit($form_state, $page = NULL) {
   if (!isset($page)) {
-    $page = new stdClass();
-    $page->name = t('Custom page');
-    $page->path = '';
-    $page->weight = 0;
-    $page->enabled = 1;
-    $page->tags = array();
+    $page = (object) array(
+      'name' => t('Custom page'),
+      'path' => '',
+      'weight' => 0,
+      'enabled' => 1,
+      'tags' => array(),
+    );
   }
   else {
     $form['pid'] = array(
Index: nodewords.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodewords/nodewords.module,v
retrieving revision 1.57.2.251
diff -u -p -r1.57.2.251 nodewords.module
--- nodewords.module	25 Nov 2009 09:51:49 -0000	1.57.2.251
+++ nodewords.module	26 Nov 2009 17:53:18 -0000
@@ -408,7 +408,7 @@ function nodewords_nodeapi(&$node, $op, 
       );
 
     case 'update index':
-      $tags = array();
+      $output_tags = array();
       $tag_options = array(
         'type' => NODEWORDS_TYPE_NODE,
         'ids' => array($node->nid),
@@ -433,7 +433,7 @@ function nodewords_nodeapi(&$node, $op, 
           }
         }
 
-        $output = nodewords_output_tags($tags, 'update index');
+        $output = nodewords_output_tags($output_tags, 'update index');
         $tag_options['output'] = 'update index';
 
         drupal_alter('nodewords_tags_output', $output, $tag_options);
@@ -455,12 +455,13 @@ function nodewords_perm() {
  * Implementation of hook_preprocess_page().
  */
 function nodewords_preprocess_page(&$variables) {
-  list($type, $ids) = _nodewords_detect_type_and_ids();
-  $tags = nodewords_get_tags($type, $ids);
+  $parameters = array();
+  $result = _nodewords_detect_type_and_ids();
+  $tags = nodewords_get_tags($result[0], $result[1]);
 
   $output = nodewords_output_tags($tags);
-  $parameters['type'] = $type;
-  $parameters['ids'] = $ids;
+  $parameters['type'] = $result[0];
+  $parameters['ids'] = $result[1];
   $parameters['output'] = 'head';
 
   drupal_alter('nodewords_tags_output', $output, $parameters);
@@ -1211,19 +1212,14 @@ function _nodewords_detect_type_and_ids(
   }
 
   foreach (_nodewords_get_pages_data() as $page) {
+    $alias = drupal_get_path_alias($_GET['q']);
     $path = $page->path;
 
-    if (drupal_match_path($_GET['q'], $path)) {
+    if ($alias != $_GET['q'] && drupal_match_path($alias, $path)) {
       return array(NODEWORDS_TYPE_PAGE, $path);
     }
 
-    $alias = drupal_get_path_alias($_GET['q']);
-    $bool = (
-      $alias != $_GET['q'] &&
-      drupal_match_path($alias, $path)
-    );
-
-    if ($bool) {
+    if (drupal_match_path($_GET['q'], $path)) {
       return array(NODEWORDS_TYPE_PAGE, $path);
     }
   }
