diff --git mailarchive.module mailarchive.module
index 3b14d7a..d434710 100644
--- mailarchive.module
+++ mailarchive.module
@@ -126,12 +126,12 @@ function mailarchive_admin_settings() {
  * Validate the mailing list archive module configuration page.
  */
 function mailarchive_admin_settings_validate($form, &$form_state) {
-  if ($form['mailarchive_save_attachments']) {
-    if ($form['mailarchive_attachments_path'] == '') {
+  if ($form_state['values']['mailarchive_save_attachments']) {
+    if ($form_state['values']['mailarchive_attachments_path'] == '') {
       form_set_error('mailarchive_attachments_path', t('If you enable the saving of attachments, you must specify an attachment subdirectory.'));
     }
     else {
-      $attachments_path = file_directory_path() .'/'. $form['mailarchive_attachments_path'];
+      $attachments_path = file_directory_path() .'/'. $form_state['values']['mailarchive_attachments_path'];
       if (!file_check_directory($attachments_path, FILE_CREATE_DIRECTORY)) {
         form_set_error('mailarchive_attachments_path', t('The attachment subdirectory you have entered does not exist or is not writeable.  Please verify that your Drupal file system settings are properly configured, then try again.'));
       }
@@ -143,10 +143,10 @@ function mailarchive_admin_settings_validate($form, &$form_state) {
  * Save the mailing list archive module settings.
  */
 function mailarchive_admin_settings_submit($form, &$form_state) {
-  variable_set('mailarchive_download_limit', $form['mailarchive_download_limit']);
-  variable_set('mailarchive_save_attachments', $form['mailarchive_save_attachments']);
-  variable_set('mailarchive_attachments_path', $form['mailarchive_attachments_path']);
-  variable_set('mailarchive_filter_format', $form['format']);
+  variable_set('mailarchive_download_limit', $form_state['values']['mailarchive_download_limit']);
+  variable_set('mailarchive_save_attachments', $form_state['values']['mailarchive_save_attachments']);
+  variable_set('mailarchive_attachments_path', $form_state['values']['mailarchive_attachments_path']);
+  variable_set('mailarchive_filter_format', $form_state['values']['format']);
   drupal_set_message('Mailing list archive settings saved.');
 }
 
