Index: fb_tab.module
===================================================================
--- fb_tab.module	(revision 3986)
+++ fb_tab.module	(working copy)
@@ -117,7 +117,7 @@
   }
   elseif ($op == FB_OP_INITIALIZE) {
     if (fb_is_tab()) {
-      $config = _fb_tab_get_config($fb_app);
+      $config = _fb_tab_get_app_config($fb_app);
       if (!isset($GLOBALS['custom_theme'])) {
         $GLOBALS['custom_theme'] = $config['custom_theme'];
       }
@@ -147,7 +147,7 @@
       }

       // Override what Drupal renders.
-      if ($_REQUEST['q'] == FB_TAB_PATH_VIEW) { // Do not override fb_tab/config.
+      if (arg(0) == 'fb_tab' && arg(1) == 'view') { // Do not override fb_tab/config.
         $sr = $fb->getSignedRequest();
         if ($sr['page'] && $sr['page']['liked'] && $config['profile_tab_url_liked']) {
           $path = $config['profile_tab_url_liked'];
@@ -213,7 +213,7 @@
 /**
  * Helper returns configuration for this module, on a per-app basis.
  */
-function _fb_tab_get_config($fb_app) {
+function _fb_tab_get_app_config($fb_app) {
   $fb_app_data = fb_get_app_data($fb_app);
   $config = isset($fb_app_data['fb_tab']) ? $fb_app_data['fb_tab'] : array();

@@ -238,7 +238,8 @@

   $profile_id = fb_settings(FB_SETTINGS_CB_PAGE);

-  $config = fb_tab_fetch_config($fb_app, $profile_id);
+  $config = fb_tab_get_page_config($fb_app, $profile_id);
+  dpm($config, __FUNCTION__);

   $sr = $fb->getSignedRequest();

@@ -262,7 +263,7 @@
   $fb_app = $GLOBALS['_fb_app'];
   $fb = $GLOBALS['_fb'];

-  $config = fb_tab_fetch_config($fb_app, $profile_id);
+  $config = fb_tab_get_page_config($fb_app, $profile_id);
   $sr = $fb->getSignedRequest();

   $data = array(
@@ -369,7 +370,7 @@
  * Return configuration of a tab by application (access via 'label') and page ID.
  * Page ID exists because an app can present different views on different pages.
  */
-function fb_tab_fetch_config($fb_app, $profile_id) {
+function fb_tab_get_page_config($fb_app, $profile_id) {
   $result = db_query("SELECT * FROM {fb_tab} WHERE label = '%s' AND profile_id = %d" , $fb_app->label, $profile_id);

   $row = db_fetch_array($result);
Index: fb_tab.admin.inc
===================================================================
--- fb_tab.admin.inc	(revision 3986)
+++ fb_tab.admin.inc	(working copy)
@@ -12,7 +12,7 @@
 function fb_tab_fb_admin($op, $data, &$return) {
   $fb = isset($data['fb']) ? $data['fb'] : NULL;
   $fb_app = isset($data['fb_app']) ? $data['fb_app'] : NULL;
-  $config = _fb_tab_get_config($fb_app);
+  $config = _fb_tab_get_app_config($fb_app);
   if ($op == FB_ADMIN_OP_SET_PROPERTIES) {
     $return['tab_default_name'] = $config['tab_default_name'];

@@ -100,7 +100,7 @@
   // Add our settings to the fb_app edit form.
   if (isset($form['fb_app_data']) && is_array($form['fb_app_data'])) {
     $fb_app = $form['#fb_app'];
-    $config = _fb_tab_get_config($fb_app);
+    $config = _fb_tab_get_app_config($fb_app);

     $form['fb_app_data']['fb_tab'] = array(
       '#type' => 'fieldset',
