diff --git a/htmlmail--simplenews.tpl.php b/htmlmail--simplenews.tpl.php
index dd78d67..039d14e 100644
--- a/htmlmail--simplenews.tpl.php
+++ b/htmlmail--simplenews.tpl.php
@@ -61,7 +61,7 @@
 ?>
 <?php if ($key == 'node' || $key == 'test'): ?>
 <div class="htmlmail-simplenews-link">
-  <a href="<?php echo url('node/' . $params['context']['node']->nid, array('absolute' => TRUE)); ?>">
+  <a href="<?php echo url('node/' . $params['simplenews_source']->getNode()->nid, array('absolute' => TRUE)); ?>">
     Click here to view this message on the web.
   </a>
 </div>
