=== modified file 'includes/path.inc'
--- includes/path.inc	
+++ includes/path.inc	
@@ -14,12 +14,22 @@
  * Initialize the $_GET['q'] variable to the proper normal path.
  */
 function drupal_init_path() {
+  global $drupal_init_path;
   if (!empty($_GET['q'])) {
     $_GET['q'] = drupal_get_normal_path(trim($_GET['q'], '/'));
   }
   else {
     $_GET['q'] = drupal_get_normal_path(variable_get('site_frontpage', 'node'));
   }
+  $drupal_init_path = $_GET['q'];
+}
+
+/**
+ * Get the original init path.
+ */
+function drupal_get_init_path() {
+  global $drupal_init_path;
+  return $drupal_init_path;
 }
 
 /**
=== modified file 'modules/statistics.module'
--- modules/statistics.module	
+++ modules/statistics.module	
@@ -78,7 +78,7 @@
   }
   if ((variable_get('statistics_enable_access_log', 0)) && (module_invoke('throttle', 'status') == 0)) {
     // Log this page access.
-    db_query("INSERT INTO {accesslog} (title, path, url, hostname, uid, sid, timer, timestamp) values('%s', '%s', '%s', '%s', %d, '%s', %d, %d)", strip_tags(drupal_get_title()), $_GET['q'], referer_uri(), $_SERVER['REMOTE_ADDR'], $user->uid, session_id(), timer_read('page'), time());
+    db_query("INSERT INTO {accesslog} (title, path, url, hostname, uid, sid, timer, timestamp) values('%s', '%s', '%s', '%s', %d, '%s', %d, %d)", strip_tags(drupal_get_title()), drupal_get_init_path(), referer_uri(), $_SERVER['REMOTE_ADDR'], $user->uid, session_id(), timer_read('page'), time());
   }
 }
 
