diff --git a/mobile_tools.module b/mobile_tools.module
index 4a17219..ba913c5 100755
--- a/mobile_tools.module
+++ b/mobile_tools.module
@@ -145,6 +145,23 @@ function mobile_tools_menu_switch_site(){
 }
 
 /**
+ * Create the url to go to the desktop/mobile version
+ */
+function mobile_tools_switch_menu_link($site, $path, $options) {
+  $url = '';
+  switch($site) {
+    case 'mobile':
+      $url = variable_get('mobile_tools_mobile_url');
+      break;
+    case 'desktop':
+    default:
+      $url = variable_get('mobile_tools_desktop_url');
+    
+  }
+  return url($url . '/' . $path, $options);
+}
+
+/**
  * Implementation of hook_theme()
  */
 function mobile_tools_theme(){
@@ -183,20 +200,18 @@ function mobile_tools_block_view($delta) {
 function mobile_tools_block_message() {
   $site = mobile_tools_site_type();
   $query = drupal_get_query_parameters($_GET, array('q', 'device'));
-  $querystring = drupal_http_build_query($query);
-  if(!empty($querystring)){
-    $querystring = '?' . $querystring;
-  }
+  $options['query'] = drupal_http_build_query($query);
+
   if ($site  == 'mobile' ) {
     $output = variable_get('mobile_notification', MOBILE_NOTIFICATION);
-    $desktop_url = mobile_tools_switch_menu_link('desktop', $_GET['q']);
-    $output = t($output, array('!desktop_url' => '/' . $desktop_url . $querystring));
+    $desktop_url = mobile_tools_switch_menu_link('desktop', $_GET['q'], $options);
+    $output = t($output, array('!desktop_url' => $desktop_url));
     return $output;
   }
   elseif($site == 'desktop') {
     $output = variable_get('desktop_notification', DESKTOP_NOTIFICATION);
-    $mobile_url = mobile_tools_switch_menu_link('mobile', $_GET['q']);
-    $output = t($output, array('!mobile_url' => '/' . $mobile_url . $querystring));
+    $mobile_url = mobile_tools_switch_menu_link('mobile', $_GET['q'], $options);
+    $output = t($output, array('!mobile_url' => $mobile_url));
     return $output;
   }
 }
