diff --git a/protected_node.module b/protected_node.module
index 535538d..488cd19 100644
--- a/protected_node.module
+++ b/protected_node.module
@@ -432,7 +432,7 @@ function protected_node_node_validate($node, $form) {
           $m = trim($m);
           if ($m) {
             if (!valid_email_address($m)) {
-              form_error($arg['protected_node']['protected_node_emails'], t('Invalid email address: @m. Please correct this mistake and try again.', array('@m' => $m)));
+              form_error($form['protected_node']['protected_node_emails'], t('Invalid email address: @m. Please correct this mistake and try again.', array('@m' => $m)));
               unset($emails[$k]); // unset just in case; should be useless though
             }
             else {
@@ -454,7 +454,7 @@ function protected_node_node_validate($node, $form) {
       }
       else {
         // the node is not published, forget about emails!
-        form_error($arg['protected_node']['protected_node_emails'], t('Invalid email address: @m. Please correct this mistake and try again.', array('@m' => $m)));
+        form_error($form['protected_node']['protected_node_emails'], t('Invalid email address: @m. Please correct this mistake and try again.', array('@m' => $m)));
       }
     }
     if ($missing_password) {
@@ -469,14 +469,13 @@ function protected_node_node_validate($node, $form) {
       }
       switch ($global_password) {
         case PROTECTED_NODE_PER_NODE_PASSWORD:
-          // $arg is the form in this case
-          form_error($arg['protected_node']['protected_node_passwd'], t('To protect this page, please enter a password.'));
+          form_error($form['protected_node']['protected_node_passwd'], t('To protect this page, please enter a password.'));
           break;
       }
     }
   }
   elseif (isset($node->protected_node_emails) && trim($node->protected_node_emails)) {
-    form_error($arg['protected_node']['protected_node_emails'], t('No email can be sent by the protected node module when the node is not protected or you do not have permission to set a password.'));
+    form_error($form['protected_node']['protected_node_emails'], t('No email can be sent by the protected node module when the node is not protected or you do not have permission to set a password.'));
   }
 }
 
