diff --git a/fontyourface.module b/fontyourface.module
index 8d77d14..0d66a18 100644
--- a/fontyourface.module
+++ b/fontyourface.module
@@ -422,6 +422,10 @@ function fontyourface_save_font(&$font, $revert = FALSE) {
 
   $exists = db_query("SELECT fid FROM {fontyourface_font} WHERE url = :url", array(':url' => $font->url))->fetchObject();
 
+  if (!isset($font->css_selector)) {
+    $font->css_selector = '<none>';
+  }
+
   if ($exists) {
 
     $existing_font = fontyourface_get_font($exists->fid);
@@ -431,7 +435,9 @@ function fontyourface_save_font(&$font, $revert = FALSE) {
     if (!$revert) {
       // Keep status, selector, and tags the same.
       $font->enabled = $existing_font->enabled;
-      $font->css_selector = $existing_font->css_selector;
+      if ($existing_font->css_selector !== NULL) {
+        $font->css_selector = $existing_font->css_selector;
+      }
     }
 
     fontyourface_add_font_tags($font);
@@ -667,12 +673,6 @@ function fontyourface_delete_unused_tags() {
 
 /**
  * Logs to watchdog if logging is enabled.
- *
- * @param string $message
- *   Log message. This should be a literal string; see
- *   http://drupal.org/node/323101 for more details.
- * @param array $arguments
- *   Arguments to replace placeholders, if there are any, in $message.
  */
 function fontyourface_log($message, $arguments) {
 
diff --git a/modules/typekit_api/typekit_api.module b/modules/typekit_api/typekit_api.module
index 4fe0a4e..9bbcecc 100644
--- a/modules/typekit_api/typekit_api.module
+++ b/modules/typekit_api/typekit_api.module
@@ -66,8 +66,10 @@ function typekit_api_fontyourface_import() {
           $font->css_family = "'" . implode("', '", $family_info->css_names) . "'";
           $font->css_style = $variant->font_style;
           $font->css_weight = $variant->font_weight;
-          $font->foundry = $variant->foundry->name;
-          $font->foundry_url = 'http://typekit.com/foundries/' . $variant->foundry->slug;
+          if (isset($variant->foundry)) {
+            $font->foundry = $variant->foundry->name;
+            $font->foundry_url = 'http://typekit.com/foundries/' . $variant->foundry->slug;
+          }
           $font->tags = array();
 
           fontyourface_save_font($font);
