--- workflow.module.orig	2010-10-23 13:04:27.752345422 +0300
+++ workflow.module	2010-10-24 11:50:38.788286564 +0300
@@ -273,6 +274,7 @@ function workflow_comment($a1, $op) {
 function workflow_transition($node, $sid) {
   // Make sure new state is a valid choice.
   if (array_key_exists($sid, workflow_field_choices($node))) {
+    $node->workflow_scheduled = isset($node->workflow_scheduled) ? $node->workflow_scheduled : FALSE;
     if (!$node->workflow_scheduled) {
       // It's an immediate change. Do the transition.
       workflow_execute_transition($node, $sid, isset($node->workflow_comment) ? $node->workflow_comment : NULL);
@@ -1547,7 +1549,7 @@ function workflow_token_values($type, $o
         $user_name = $node->uid ? $node->name : variable_get('anonymous', 'Anonymous');
         $uid = $node->uid;
         $mail = $node->uid ? $node->user_mail : '';
-        $comment = $node->workflow_comment;
+        $comment = isset($node->workflow_comment) ? $node->workflow_comment : '';
       }
       else if (!isset($node->workflow) && empty($row->sid)) {
         // If the state is not specified and the node has no workflow history,
@@ -1561,7 +1563,7 @@ function workflow_token_values($type, $o
         $user_name = $node->uid ? $node->name : variable_get('anonymous', 'Anonymous');
         $uid = $node->uid;
         $mail = $node->uid ? $node->user_mail : '';
-        $comment = $node->workflow_comment;
+        $comment = isset($node->workflow_comment) ? $node->workflow_comment : '';
       }
       else {
         // Default to the most recent transition data in the workflow history table.
