diff --git a/CHANGELOG.md b/CHANGELOG.md
index 565f7ec686d293845842682e79557cb4b0f3aca5..1d312c66202dc18a48f3ebe44df406bc1d60a976 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
 * Regression fix dashlets not working anymore #122
 * Fixed contact Summary tab not loading due to fatal error. See !115 and #122
 * Performance improvements.
+* Fixed issue with Contact Search and Hard limit and paging.
 
 # Version 1.69
 
diff --git a/CRM/Dataprocessor/Form/Output/AbstractUIOutputForm.php b/CRM/Dataprocessor/Form/Output/AbstractUIOutputForm.php
index bf39efce34d51186b9ba86c8ccdded06b6429d0f..51650e4d48c85511a457cae99d1f11738b54df99 100644
--- a/CRM/Dataprocessor/Form/Output/AbstractUIOutputForm.php
+++ b/CRM/Dataprocessor/Form/Output/AbstractUIOutputForm.php
@@ -270,11 +270,18 @@ abstract class CRM_Dataprocessor_Form_Output_AbstractUIOutputForm extends CRM_Co
     $limit = static::getDefaultLimit($output);
     if (isset($submittedValues['crmRowCount']) && $submittedValues['crmRowCount']) {
       $limit = $submittedValues['crmRowCount'];
+    } elseif (CRM_Utils_Request::retrieve('crmRowCount', 'Integer')) {
+      $limit = CRM_Utils_Request::retrieve('crmRowCount', 'Integer');
+    }
+    $pageId = 1;
+    if (isset($submittedValues['crmPID'])) {
+      $pageId = $submittedValues['crmPID'];
+    } elseif (CRM_Utils_Request::retrieve('crmPID', 'Integer')) {
+      $pageId = CRM_Utils_Request::retrieve('crmPID', 'Integer');
     }
-    $pageId = isset($submittedValues['crmPID']) ?? 1;
     $offset = static::getOffset($pageId, $limit, $hardLimit);
-    if ($hardLimit && $limit > $hardLimit) {
-      $limit = $hardLimit;
+    if ($hardLimit && ($offset + $limit) > $hardLimit) {
+      $limit = $hardLimit - $offset;
     }
     try {
       $dataProcessor->getDataFlow()->setOffset($offset);