diff --git a/ajax_comments.module b/ajax_comments.module
index 0f363f2..2805f50 100644
--- a/ajax_comments.module
+++ b/ajax_comments.module
@@ -75,7 +75,7 @@ function ajax_comments_submit_js($form, &$form_state) {
  * Implementation of hook_comment_view().
  */
 function ajax_comments_comment_view($comment, $view_mode, $langcode) {
-  $active = ajax_comments_node_type_active(ltrim($comment->node_type, 'comment_node_'));
+  $active = ajax_comments_node_type_active(substr($comment->node_type, strlen('comment_node_')));  
   if ($active) {
     $comment->content['links']['comment']['#links']['comment-reply']['attributes']['class'] = array('use-ajax');
     $comment->content['links']['comment']['#links']['comment-reply']['href'] = 'ajax_comments/reply/' . $comment->nid . '/' . $comment->cid;
