diff --git a/includes/context.inc b/includes/context.inc
index 93be748..a5cf884 100644
--- a/includes/context.inc
+++ b/includes/context.inc
@@ -994,10 +994,15 @@ function ctools_context_get_context_from_relationships($relationships, &$context
     if (is_array($rdata['context'])) {
       $rcontexts = array();
       foreach ($rdata['context'] as $cid) {
-        if (empty($contexts[$cid])) {
-          continue 2;
+        if ($cid != 'empty') {
+          if (empty($contexts[$cid])) {
+            continue 2;
+          }
+          $rcontexts[] = $contexts[$cid];
+        }
+        else {
+          $rcontexts[] = NULL;
         }
-        $rcontexts[] = $contexts[$cid];
       }
     }
     else {
diff --git a/includes/context.theme.inc b/includes/context.theme.inc
index 8f660b8..50faa18 100644
--- a/includes/context.theme.inc
+++ b/includes/context.theme.inc
@@ -216,7 +216,9 @@ function theme_ctools_context_list($vars) {
       if (is_array($relationship['context'])) {
         $rtitles = array();
         foreach ($relationship['context'] as $cid) {
-          $rtitles[$cid] = $titles[$cid];
+          if ($cid != 'empty') {
+            $rtitles[$cid] = $titles[$cid];
+          }
         }
         $title = implode(' + ', $rtitles);
       }
diff --git a/views_content/plugins/relationships/view_from_argument.inc b/views_content/plugins/relationships/view_from_argument.inc
index cefc6db..b646098 100644
--- a/views_content/plugins/relationships/view_from_argument.inc
+++ b/views_content/plugins/relationships/view_from_argument.inc
@@ -58,30 +58,44 @@ function views_content_view_from_argument_context($contexts, $conf) {
   $name = $conf['name'];
   list($plugin, $view_data) = explode(':', $name);
   list($view_name, $display_id) = explode('-', $view_data);
-  $keys = array_keys($conf['context']);
-
-  if (empty($contexts[$keys[0]]->data)) {
-    return ctools_context_create_empty('view', NULL);
-  }
 
   // Load our view up.
   $data = views_get_view($view_name);
+  $args = array();
   if ($data) {
     // Set the display.
     $data->set_display($display_id);
-    $context_keys = array_keys($contexts);
-    foreach ($data->display_handler->get_argument_input() as $id => $argument) {
+    $view_args = $contexts;
+    $view_args_settings = $data->display_handler->get_argument_input();
+
+    foreach ($view_args_settings as $id => $argument) {
       if ($argument['type'] == 'context') {
-        $key = array_shift($context_keys);
-        if (isset($contexts [$key])) {
+        $context = array_shift($view_args);
+        if (!isset($argument['context_optional']) || !$argument['context_optional']) {
+          if (empty($context->data)) {
+            return ctools_context_create_empty('view', NULL);
+          }
+        }
+        if (!empty($context)) {
           if (strpos($argument['context'], '.')) {
-            list($context, $converter) = explode('.', $argument['context'], 2);
-            $args[] = ctools_context_convert_context($contexts[$key], $converter, array('sanitize' => FALSE));
+            list($argument_context, $converter) = explode('.', $argument['context'], 2);
+            if (is_array($context->type) && in_array($argument_context, $context->type)) {
+              $args[] = ctools_context_convert_context($context, $converter);
+            }
+            elseif (is_string($context->type) && $context->type == $argument_context) {
+              $args[] = ctools_context_convert_context($context, $converter);
+            }
+            else {
+              $args[] = NULL;
+            }
           }
           else {
-            $args[] = $contexts[$key]->argument;
+            $args[] = $context->argument;
           }
         }
+        else {
+          $args[] = NULL;
+        }
       }
     }
     // remove any trailing NULL arguments as these are non-args:
@@ -92,9 +106,6 @@ function views_content_view_from_argument_context($contexts, $conf) {
     if ($path = $data->display_handler->get_option('inherit_panels_path')) {
       $data->override_path = $_GET['q'];
     }
-  }
-
-  if (isset($contexts[$keys[0]]->data)) {
     return ctools_context_create('view', $data);
   }
 }
