diff --git a/Classes/Pagination/Pagination.php b/Classes/Pagination/Pagination.php
index f6c2c7e415aa271ab1d000421f831aaece5bf4a8..c69fceef1a769e933e41d457a04d4d8234db4c6d 100644
--- a/Classes/Pagination/Pagination.php
+++ b/Classes/Pagination/Pagination.php
@@ -86,7 +86,7 @@ class Pagination {
 	public function initialize() {
 		$this->firstPage = 1;
 		$this->totalItems = $this->fetchTotalItemCount();
-		$this->lastPage = ceil($this->totalItems / $this->limit);
+		$this->lastPage = (int) ceil($this->totalItems / $this->limit);
 		// correct current page if out of bounds
 		$this->currentPage = $this->currentPage < 1 ? 1 : min($this->currentPage, $this->lastPage);
 		$this->nextPage = $this->currentPage >= $this->lastPage ? $this->lastPage : $this->currentPage + 1;
@@ -110,8 +110,7 @@ class Pagination {
 	private function fetchTotalItemCount(): int {
 		$query = clone $this->queryResult->getQuery();
 		$query->setOffset(0)->setLimit(9999999);
-		$count = $query->execute()->count();
-		return $count ?? 0;
+		return $query->execute()->count();
 	}
 
 	/**
@@ -124,8 +123,7 @@ class Pagination {
 	private function fetchItems(): array {
 		$query = clone $this->queryResult->getQuery();
 		$query->setOffset($this->startItem - 1)->setLimit($this->limit);
-		$items = $query->execute(TRUE);
-		return $items ?? [];
+		return $query->execute(TRUE);
 	}
 
 	/**
diff --git a/composer.json b/composer.json
index 25be3668520c52ae1aa0860a5b6c98ac407ba69d..31aef70677f62cf78c8f326257435f30539165d7 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
 	"license": [
 		"GPL-2.0-or-later"
 	],
-	"version": "5.2.0",
+	"version": "5.2.1",
 	"support": {
 		"issues": "https://gitlab.sgalinski.de/typo3/sg_jobs"
 	},
diff --git a/ext_emconf.php b/ext_emconf.php
index 559dad9f982238aa029c55c42d0b8b250b16dfe0..c3944893ac576e89326944ff5e5d78307131f5cd 100644
--- a/ext_emconf.php
+++ b/ext_emconf.php
@@ -4,7 +4,7 @@ $EM_CONF['sg_jobs'] = [
 	'title' => 'Jobs',
 	'description' => 'Manage and display your Job offers.',
 	'category' => 'plugin',
-	'version' => '5.2.0',
+	'version' => '5.2.1',
 	'state' => 'stable',
 	'uploadfolder' => FALSE,
 	'createDirs' => '',