diff --git a/plugins/content_types/pm_existing_pages.inc b/plugins/content_types/pm_existing_pages.inc
index 9e3aef0..2c45669 100644
--- a/plugins/content_types/pm_existing_pages.inc
+++ b/plugins/content_types/pm_existing_pages.inc
@@ -25,20 +25,13 @@ $plugin = array(
 function pm_existing_pages_pm_existing_pages_content_type_render($subtype, $conf, $panel_args) {
 
   $task = pm_existing_pages_get_existing_pages($conf['task_id']);
-  if (!$task) {
+  if (!$task || empty($panel_args)) {
     return;
   }
 
-  $menu_item = menu_get_item();
-  if (!empty($menu_item['page_arguments'])) {
-    $args = $menu_item['page_arguments'];
-  }
-
-  if (empty($args)) {
-    return;
-  }
+  $menu_args = $panel_args[1];
+  $pm_args = $panel_args[2];
 
-  $pm_args = array_pop($args);
   $function = $pm_args['pc'];
   $file = $pm_args['f'];
   $file_path = $pm_args['fp'];
@@ -50,7 +43,7 @@ function pm_existing_pages_pm_existing_pages_content_type_render($subtype, $conf
     }
     require_once DRUPAL_ROOT . '/' . $file_path . '/' . $file;
   }
-  $content = call_user_func_array($function, $args);
+  $content = call_user_func_array($function, $menu_args);
 
   $block = new stdClass();
   $block->module = 'pm_existing_pages';
diff --git a/plugins/export_ui/pm_existing_pages.inc b/plugins/export_ui/pm_existing_pages.inc
index b38f124..ab5feb2 100644
--- a/plugins/export_ui/pm_existing_pages.inc
+++ b/plugins/export_ui/pm_existing_pages.inc
@@ -120,7 +120,7 @@ function pm_existing_pages_find_paths($search = '') {
       ->fields('mr', array('path', 'title', 'page_callback', 'load_functions'))
       ->condition('page_callback', 'page_manager_page_execute', '!=')
       ->condition('page_callback', 'pm_existing_pages_pm_existing_pages_page', '!=')
-      ->condition('path', $search . '%', 'LIKE')
+      ->condition('path', db_like($search) . '%', 'LIKE')
       ->extend('PagerDefault')
       ->limit(10)
       ->execute();
diff --git a/plugins/tasks/pm_existing_pages.inc b/plugins/tasks/pm_existing_pages.inc
index 629a8c7..72c7232 100644
--- a/plugins/tasks/pm_existing_pages.inc
+++ b/plugins/tasks/pm_existing_pages.inc
@@ -88,7 +88,12 @@ function pm_existing_pages_pm_existing_pages_menu_alter(&$items, $task) {
 function pm_existing_pages_pm_existing_pages_page() {
   $args = func_get_args();
 
-  $pm_args = array_pop($args);
+  // Determine which are the menu and pmep arguments.
+  $split_args = _pm_existing_pages_get_pm_args($args);
+  $menu_args = $split_args['menu'];
+
+  // Get pmep arguments.
+  $pm_args = $split_args['pmep'];
   $task_id = $pm_args['ti'];
   $function = $pm_args['pc'];
   $file = $pm_args['f'];
@@ -104,7 +109,7 @@ function pm_existing_pages_pm_existing_pages_page() {
   ctools_include('context-task-handler');
   $context_args = _pm_existing_pages_get_context_arguments($args, $pm_args, $task_id);
   $contexts = ctools_context_handler_get_task_contexts($task, $subtask, array($context_args[0]));
-  $output = ctools_context_handler_render($task, $subtask, $contexts, array($context_args[1]));
+  $output = ctools_context_handler_render($task, $subtask, $contexts, array($context_args[1], $menu_args, $pm_args));
   if ($output !== FALSE) {
     return $output;
   }
@@ -267,3 +272,32 @@ function _pm_existing_pages_get_context_arguments($menu_args, $pm_args, $task_id
   // Nothing found.
   return array(0 => '', 1 => '');
 }
+
+/**
+ * Helper function to split menu arguments from pm arguments.
+ *
+ * We don't know if there will be any additional arguments
+ * send along through the URL which are not menu loader
+ * arguments or unknown in the menu router path. So
+ * depending on the path, the array we need for pmep
+ * can be the first or last.
+ *
+ * @param $args
+ *   A collection of arguments.
+ */
+function _pm_existing_pages_get_pm_args($args) {
+
+  $arguments = array('menu' => array(), 'pmep' => array());
+
+  foreach ($args as $key => $value) {
+    if (is_array($value) && isset($value['ti'])) {
+      // Supposing this pmep argument.
+      $arguments['pmep'] = $args[$key];
+    }
+    else {
+      $arguments['menu'][] = $value;
+    }
+  }
+
+  return $arguments;
+}
