diff --git a/c:/Users/alex/protected_node.module b/c:/Users/alex/protected_node.module-old
index 41fdae3..485b226 100644
--- a/c:/Users/alex/protected_node.module
+++ b/c:/Users/alex/protected_node.module-old
@@ -691,14 +691,12 @@ function _protected_node_save(&$node) {
     if ($changed) {
       $args['protected_node_passwd_changed'] = REQUEST_TIME;
     }
-    
  /********************* code to update the node protected password ***********************/
-    if($node->protected_node_clear_passwd) {
-        $node_protected_password = variable_get('node_protected_password', array());    
-        $node_protected_password[$node->nid] = $node->protected_node_clear_passwd;
-        variable_set('node_protected_password', $node_protected_password);
+    $node_protected_password = array ( $node->nid => $node->protected_node_clear_passwd );
+    if($node_protected_password){
+        variable_set(node_protected_password, $node_protected_password);
     }
-    
+ 
     $num_updated = db_update('protected_nodes')
       ->fields($args)
       ->condition('nid', $node->nid)
@@ -717,13 +715,11 @@ function _protected_node_save(&$node) {
     // one has ever entered a password for this node
     
 /*********************** code to insert the protect node password *************************/
-
-    if($node->protected_node_clear_passwd) {
-        $node_protected_password = variable_get('node_protected_password', array());    
-        $node_protected_password[$node->nid] = $node->protected_node_clear_passwd;
-        variable_set('node_protected_password', $node_protected_password);
+    $node_protected_password = array ( $node->nid => $node->protected_node_clear_passwd );
+    if($node_protected_password){
+        variable_set(node_protected_password, $node_protected_password);
     }
-    
+
     $nid = db_insert('protected_nodes')
       ->fields(array(
         'protected_node_is_protected' => $node->protected_node_is_protected,
