diff --git a/files_undo_remove.module b/files_undo_remove.module
index 3d89ac3..da26b64 100644
--- a/files_undo_remove.module
+++ b/files_undo_remove.module
@@ -6,6 +6,18 @@
  */
 
 /**
+ * Implements hook_init().
+ */
+function files_undo_remove_init() {
+  // Add the Javascript and css. This will disable the 'Remove' buttons
+  // and add nice CSS to the table rows. We need todo this here, because
+  // it's possible a field collection on say an existing node doesn't have
+  // any files yet so the 'remove' button would fail on editing as well.
+  drupal_add_js(drupal_get_path('module', 'files_undo_remove') . '/files_undo_remove.js');
+  drupal_add_css(drupal_get_path('module', 'files_undo_remove') . '/files_undo_remove.css');
+}
+
+/**
  * Implements hook_element_info_alter().
  */
 function files_undo_remove_element_info_alter(&$type) {
@@ -18,7 +30,6 @@ function files_undo_remove_element_info_alter(&$type) {
  * Process callback on managed_file type.
  */
 function files_undo_remove_file_process($element, &$form_state, $form) {
-  static $added = FALSE;
 
   if (isset($element['fid']) && !empty($element['fid']['#value'])) {
 
@@ -27,14 +38,6 @@ function files_undo_remove_file_process($element, &$form_state, $form) {
       return $element;
     }
 
-    if (!$added) {
-      // Add the Javascript and css. This will disable the 'Remove' buttons
-      // and add nice CSS to the table rows.
-      $added = TRUE;
-      $element['#attached']['js'][] = drupal_get_path('module', 'files_undo_remove') . '/files_undo_remove.js';
-      $element['#attached']['css'][] = drupal_get_path('module', 'files_undo_remove') . '/files_undo_remove.css';
-    }
-
     // Change the remove button to one of ours.
     $element['remove_button'] = array(
       '#name' => $element['remove_button']['#name'],
