diff --git a/custom_pagers.module b/custom_pagers.module
index 3df67ff..30320c6 100644
--- a/custom_pagers.module
+++ b/custom_pagers.module
@@ -302,7 +302,6 @@ function custom_pagers_get_list_from_view($pager, $node) {
 
     $view->set_display($display);
     $view->display_handler->set_option('style_plugin', 'custom_pagers_php_array');
-    $view->display_handler->set_option('items_per_page', 0);
 
     // Get arguments for the view.
     if (!empty($pager->args)) {
@@ -317,7 +316,7 @@ function custom_pagers_get_list_from_view($pager, $node) {
 
     // Remove the number-of-items-per-page restriction, as it will mess up
     // our counts.
-    $view->pager['items_per_page'] = 0;
+    $view->set_items_per_page(0);
 
     // Get the results.
     $result = $view->execute_display($display, $args);
diff --git a/views/custom_pagers.views.inc b/views/custom_pagers.views.inc
index 8d39481..72e6c46 100644
--- a/views/custom_pagers.views.inc
+++ b/views/custom_pagers.views.inc
@@ -40,7 +40,7 @@ function custom_pagers_views_plugins() {
         'handler' => 'custom_pagers_plugin_style_php_array',
         'no ui' => TRUE, // Programmatic use only.
         'uses row plugin' => FALSE,
-        'uses fields' => FALSE,
+        'uses fields' => TRUE,
         'type' => 'custom_pagers_simple',
         'even empty' => TRUE,
       ),
