diff --git a/project_issue.module b/project_issue.module
index 5ef9a80..6949147 100644
--- a/project_issue.module
+++ b/project_issue.module
@@ -1044,21 +1044,44 @@ function template_preprocess_project_issue_issue_jump_links(&$variables) {
   $variables['jumplinks'] = '';
 
   // Link to the first unread comment
-  if (comment_num_new($node->nid)) {
-    $query = db_select('comment', 'c')
-      ->fields('c', array('cid'))
-      ->condition('c.nid', $node->nid)
-      ->condition('c.created', max(node_last_viewed($node->nid), NODE_NEW_LIMIT), '>')
-      ->condition('c.status', COMMENT_PUBLISHED)
-      ->orderBy('c.cid')
-      ->range(0, 1);
-    $uri = entity_uri('comment', comment_load($query->execute()->fetchField()));
-    $links['first_unread_link'] = l(t('First unread comment'), $uri['path'], $uri['options']);
+  $timestamp = node_last_viewed($node->nid);
+  $timestamp = ($timestamp > NODE_NEW_LIMIT ? $timestamp : NODE_NEW_LIMIT);
+
+  $query = db_select('comment', 'c')
+    ->fields('c', array('cid'))
+    ->condition('c.nid', $node->nid)
+    ->condition('c.created', $timestamp, '>')
+    ->condition('c.status', COMMENT_PUBLISHED)
+    ->orderBy('c.cid')
+    ->range(0, 1);
+  $last_unread_cid = $query->execute()->fetchField();
+  // New comments.
+  if ($last_unread_cid) {
+    // Create a new page load only if the comment will be displayed in a new
+    // page, to avoid unnecessary page loads in the typical cases.
+    if (comment_get_display_page($last_unread_cid, $node->type) > 0) {
+      $comment = comment_load($last_unread_cid);
+      $uri = entity_uri('comment', $comment);
+
+      $links['first_unread_link'] = l(t('First unread comment'), $uri['path'], $uri['options']);
+    }
+    else {
+      $links['first_unread_link'] = l(t('First unread comment'), "node/$node->nid", array('fragment' => 'new'));
+    }
   }
+
   // Link to the most recent comment
   if (!empty($node->cid)) {
-    $uri = entity_uri('comment', comment_load($node->cid));
-    $links['most_recent_link'] = l(t('Most recent comment'), $uri['path'], $uri['options']);
+    // Create a new page load only if the comment will be displayed in a new
+    // page, to avoid unnecessary page loads in the typical cases.
+    if (comment_get_display_page($node->cid, $node->type) > 0) {
+      $comment = comment_load($node->cid);
+      $uri = entity_uri('comment', $comment);
+      $links['most_recent_link'] = l(t('Most recent comment'), $uri['path'], $uri['options']);
+    }
+    else {
+      $links['most_recent_link'] = l(t('Most recent comment'), "node/$node->nid", array('fragment' => "comment-{$node->cid}"));
+    }
   }
   // Link to the most recent patch
   if (!empty($node->field_issue_files)) {
