diff --git a/fb.module b/fb.module
index b437bbf..0b4cb74 100644
--- a/fb.module
+++ b/fb.module
@@ -162,6 +162,14 @@ function fb_init() {
   global $_fb;
   global $_fb_app;
 
+  // At profile installation time or in update.php hook_custom_theme() is not
+  // invoked so it's needed to try loading fb_settings.inc here.
+  if (!function_exists('fb_settings')) {
+    module_load_include('inc', 'fb', 'fb_settings');
+    // trigger test in fb_devel.module
+    $GLOBALS['fb_init_no_settings'] = TRUE;
+  }
+
   // Javascript settings needed by fb.js.
   fb_js_settings('ajax_event_url', url(FB_PATH_AJAX_EVENT, array(
                                          'absolute' => TRUE,
