Index: mobile_tools.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mobile_tools/mobile_tools.module,v
retrieving revision 1.9
diff -u -p -r1.9 mobile_tools.module
--- mobile_tools.module	8 May 2009 22:46:48 -0000	1.9
+++ mobile_tools.module	13 May 2009 02:46:54 -0000
@@ -192,8 +192,10 @@ function mobile_tools_roles_init() {
   foreach ($roles as $key => $value) {
     $role = mobile_tools_roles_info(array('id' => $key));
     if ($role->type == 'desktop' && $role->has_sibling == 1) {
-      unset($user->roles[$key]);
-      $user->roles[$role->sibling['id']] = $role->sibling['name'];  
+      if ($_SESSION['mobile-tools-mobile-device']['type'] == 'mobile') {
+        unset($user->roles[$key]);
+        $user->roles[$role->sibling['id']] = $role->sibling['name'];
+      }
     }
   }
   if ($_SESSION['mobile-tools-site-type'] == 'mobile') {
@@ -900,4 +902,4 @@ function mobile_tools_devicecapability($
  */
 function mobile_tools_device_groups() {
   return array('iphone', 'ipod', 'android', 'opera mini', 'blackberry');
-} 
\ No newline at end of file
+} 
