diff --git a/fb.install b/fb.install
index 071c48b..ad41c4f 100644
--- a/fb.install
+++ b/fb.install
@@ -6,11 +6,6 @@
  *
  */
 
-// Normally fb_settings.inc is included in settings.php or by fb.module, but that is not available during update.php.
-if (!function_exists('fb_settings')) {
-  module_load_include('inc', 'fb', 'fb_settings');
-}
-
 /**
  * Implementation of hook_requirements().
  */
@@ -141,4 +136,4 @@ function fb_install_property_message(&$ret, $reason) {
 
   $ret[] = array('success' => FALSE, 'query' => t('Manual action required.  Go to !link and set properties for each facebook application.', array('!link' => l('Facebook Applications', 'admin/build/fb'))));
 
-}
\ No newline at end of file
+}
diff --git a/fb.module b/fb.module
index b437bbf..73ace4e 100644
--- a/fb.module
+++ b/fb.module
@@ -162,6 +162,11 @@ function fb_init() {
   global $_fb;
   global $_fb_app;
 
+  if (!function_exists('fb_settings')) {
+    // This may be reached during installation, when hook_custom_theme() is not called.
+    fb_custom_theme();
+  }
+
   // Javascript settings needed by fb.js.
   fb_js_settings('ajax_event_url', url(FB_PATH_AJAX_EVENT, array(
                                          'absolute' => TRUE,
