diff --git a/file_entity.pages.inc b/file_entity.pages.inc
index c4f9005..9b3bed7 100644
--- a/file_entity.pages.inc
+++ b/file_entity.pages.inc
@@ -356,6 +356,16 @@ function file_entity_add_upload_submit($form, &$form_state) {
   $save = FALSE;
   $trigger = $form_state['triggering_element']['#id'];
 
+  // Form id's can vary depending on how many other forms are displayed, so we
+  // need to modify the trigger var. e.g edit-submit--2 to edit-submit.
+  if (strpos($trigger, 'edit-next') !== FALSE) {
+    $trigger = 'edit-next';
+  } elseif (strpos($trigger, 'edit-previous') !== FALSE) {
+    $trigger = 'edit-previous';
+  } elseif (strpos($trigger, 'edit-submit') !== FALSE) {
+    $trigger = 'edit-submit';
+  }
+
   $steps_to_check = array(2, 3);
   if ($trigger == 'edit-previous') {
     // If the previous button was hit,
