diff --git nodecomment.module nodecomment.module
index ab92252..791b492 100644
--- nodecomment.module
+++ nodecomment.module
@@ -288,10 +288,14 @@ function nodecomment_form_alter(&$form, &$form_state, $form_id) {
     if ($form['type']['#value'] .'_node_form' == $form_id) {
       $node = &$form['#node'];
 
+      // Convert dashes to underscores as we get type from menu path.
+      $type = str_replace('-', '_', arg(2));
+
       if (arg(0) == 'node'
           && arg(1) == 'add'
           && is_numeric(arg(3))
-          && in_array(arg(2), nodecomment_get_comment_types())
+          && !empty($type)
+          && in_array($type, nodecomment_get_comment_types())
          ) {
         $parent = node_load(arg(3));
         $node->comment_target_nid = arg(3);
@@ -895,6 +899,9 @@ function nodecomment_menu_alter(&$items) {
 }
 
 function _nodecomment_node_add_access($op, $type) {
+  // Note: menu callbacks receive proper type with underscores instead of
+  // hyphens because Node module creates menu items with predefined
+  // callback arguments rather than lets callback fetch argument from the url.
   $comment_types = nodecomment_get_comment_types();
   if (in_array($type, $comment_types)
       && arg(0) == 'node'
