diff --git browscap.module browscap.module
index f12823d..fc8a4f3 100644
--- browscap.module
+++ browscap.module
@@ -85,7 +85,7 @@ function browscap_exit() {
   // If monitoring is enabled, record the browser
   if (variable_get('browscap_monitor', FALSE)) {
     if ($browser = browscap_get_browser()) {
-      $browserstring = substr(trim($browser['parent']), 0, 255);
+      $browserstring = empty($browser['parent']) ? '' : substr(trim($browser['parent']), 0, 255);
       if ($browserstring == '' or $browserstring == 'Default Browser') {
         $browserstring = trim($_SERVER['HTTP_USER_AGENT']);
       }
@@ -111,6 +111,7 @@ function browscap_cron() {
   // Has it been a week since the last (attempt to) import?
   $last_imported = variable_get('browscap_imported', 0);
   if (($last_imported + 60*60*24*7) < REQUEST_TIME) {
+    require_once(drupal_get_path('module','browscap') . '/includes/admin.inc');
     _browscap_import();
     variable_set('browscap_imported', REQUEST_TIME);
   }
