diff --git a/protected_node.module b/protected_node.module
index 274ce49..be7bd53 100644
--- a/protected_node.module
+++ b/protected_node.module
@@ -185,10 +185,14 @@
       }
     }
     elseif ($param2 == 'edit' || $param2 == 'delete') {
       $nid = protected_node_is_locked(arg(1), $param2);
     }
+    // Support for webform to access the confirmation message.
+    elseif ($param2 == 'done') {
+      $nid = protected_node_is_locked(arg(1), 'view');
+    }
     else {
       // Any access right?
       $nid = protected_node_is_locked(arg(1));
     }
     if ($nid === TRUE || $nid === -1) {
@@ -752,18 +756,20 @@
   $result = db_query("SELECT nid, protected_node_passwd, protected_node_emails FROM {protected_nodes} WHERE nid = :nid", array(':nid' => $node->nid))->fetchAssoc();
   if (!empty($result)) {
     // Note: the following test prevents the user from using "0" as a password.
     if (isset($node->protected_node_passwd)) {
       $changed = $node->protected_node_passwd != $result['protected_node_passwd'];
-      if (empty($node->protected_node_passwd)) {
-        // Keep result if it's empty ...
-        $node->protected_node_passwd = $result['protected_node_passwd'];
-        $changed = FALSE;
-      }
-      else {
-        $node->protected_node_clear_passwd = $node->protected_node_passwd;
-        $node->protected_node_passwd = sha1($node->protected_node_passwd);
+      if ($changed) {
+        if (empty($node->protected_node_passwd)) {
+          // Keep result if it's empty ...
+          $node->protected_node_passwd = $result['protected_node_passwd'];
+          $changed = FALSE;
+        }
+        else {
+          $node->protected_node_clear_passwd = $node->protected_node_passwd;
+          $node->protected_node_passwd = sha1($node->protected_node_passwd);
+        }
       }
     }
     else {
       $changed = FALSE;
       $node->protected_node_passwd = $result['protected_node_passwd'];
