diff --git a/Classes/Command/MigrateNewsCommandController.php b/Classes/Command/MigrateNewsCommandController.php
index 68e8390fa858b910f81cba8bc2106e52fb72794c..8be0cbcd37765f99436ebc95b1bf2ba0c1ddadff 100644
--- a/Classes/Command/MigrateNewsCommandController.php
+++ b/Classes/Command/MigrateNewsCommandController.php
@@ -223,7 +223,7 @@ class MigrateNewsCommandController extends CommandController {
 		// match old page id with old file reference id
 		/** @var DatabaseConnection $db */
 		$db = $GLOBALS['TYPO3_DB'];
-		$where = 'tablenames = "tx_news_domain_model_news" AND fieldname = "fal_media" AND uid_foreign = ' . $this->newsPagesMap[$row['uid']];
+		$where = 'tablenames = "tx_news_domain_model_news" AND fieldname = "fal_media" AND uid_foreign = ' . $row['uid'];
 		/** @var \mysqli_result $result */
 		$fileReferenceResult = $db->exec_SELECTgetSingleRow(
 			'uid, uid_local', 'sys_file_reference_news_migration', $where