diff -urbNP mail_template.orig/mail_template.module mail_template/mail_template.module
--- mail_template.orig/mail_template.module	2011-05-24 12:16:14.000000000 +0200
+++ mail_template/mail_template.module	2011-05-31 15:18:40.000000000 +0200
@@ -195,7 +195,7 @@
  * Return one E-mail.
  */
 function mail_template_view($mail_template, $langcode = NULL, $nid = NULL, $uid=NULL) {
-  $mail_template = mail_template($mail_template, $langcode = NULL, $nid = NULL, $uid=NULL);
+  $mail_template = mail_template($mail_template, $langcode);
   drupal_set_title(t('View %title (%name) template', array('%name' => $mail_template->name, '%title' => $mail_template->title)));
   $output = '';
   //$output .= '<strong>';
@@ -266,7 +266,7 @@
  */
 function mail_template_substitutions($mail_template, $tokens = array()) {
   // Standard substitutions
-  $subs['global'] = NULL;
+  $tokens['global'] = NULL;
 	// check user tokens for subtistitions
 	if (!isset($tokens['user'])) {
 		if (is_numeric($_REQUEST['uid'])) {
