diff --git a/panels.module b/panels.module
index 5a78b8c..4b13084 100644
--- a/panels.module
+++ b/panels.module
@@ -1554,10 +1554,11 @@ function panel_context_panels_cache_get($key) {
   $arguments = array();
   if ($args) {
     $arguments = explode('\\', $args);
+    $contexts = ctools_context_handler_get_task_contexts($task, $page->subtask, $arguments);
+  }
+  else {
+    $contexts = ctools_context_handler_get_all_contexts($page->task, $page->subtask, $handler);
   }
-
-  $contexts = ctools_context_handler_get_task_contexts($task, $page->subtask, $arguments);
-  ctools_context_handler_get_handler_contexts($contexts, $handler);
 
   $cache->display = &panels_panel_context_get_display($handler);
   $cache->display->context = $contexts;
