diff --git a/features.export.inc b/features.export.inc
index bc10ebe..b480eab 100644
--- a/features.export.inc
+++ b/features.export.inc
@@ -250,7 +250,8 @@ function features_export_render($export, $module_name, $reset = FALSE) {
     foreach ($hooks as $hook_name => $hook_info) {
       $hook_code = is_array($hook_info) ? $hook_info['code'] : $hook_info;
       $hook_args = is_array($hook_info) && !empty($hook_info['args']) ? $hook_info['args'] : '';
-      $code[$file['name']][$hook_name] = features_export_render_defaults($module_name, $hook_name, $hook_code, $hook_args);
+      $hook_file = is_array($hook_info) && !empty($hook_info['file']) ? $hook_info['file'] : $file['name'];
+      $code[$hook_file][$hook_name] = features_export_render_defaults($module_name, $hook_name, $hook_code, $hook_args);
     }
   }
 
