diff --git a/sites/all/modules/ajax/ajax.module b/sites/all/modules/ajax/ajax.module
index cdf891c..9ff3ec5 100644
--- a/sites/all/modules/ajax/ajax.module
+++ b/sites/all/modules/ajax/ajax.module
@@ -314,7 +314,6 @@ function ajax_get_url($url) {
  * @return Bool
  */
 function ajax_submitter(&$form, &$form_state) {
-  $messages = drupal_get_messages(NULL, TRUE);
   $data = array(
     'form_id' => $form_state['values']['form_id'],
     'options' => $form['#ajax']
@@ -334,6 +333,11 @@ function ajax_submitter(&$form, &$form_state) {
       !empty($form_state['redirect'])) {
     $data['redirect'] = $form['redirect'];
   }
+
+  // if we've to do a javascript redirect, we keep the messages' queue, this way those messages will be shown after the redirection
+  // if we've not to do a javascript redirect, we send the messages in the ajax response
+  $messages = drupal_get_messages(NULL, empty($data['redirect']));
+
   // Messages: Status
   if (array_key_exists('status', $messages)) {
     $data['messages_status'] = $messages['status'];
