diff --git a/representative_image.api.php b/representative_image.api.php
index bb6443c..f7f319f 100644
--- a/representative_image.api.php
+++ b/representative_image.api.php
@@ -14,8 +14,6 @@
  *   The representative_image type field.
  * @param \Drupal\Core\Entity\FieldableEntityInterface $entity
  *   The source entity.
- *
- * @return void
  */
 function hook_representative_image_alter(\Drupal\Core\Field\FieldItemListInterface $items, \Drupal\Core\Field\FieldDefinitionInterface $representative_image_field, \Drupal\Core\Entity\FieldableEntityInterface $entity): void {
   // If the image has empty alt text, load in the field_alt_text value.
diff --git a/src/Plugin/Field/FieldFormatter/EntityReferenceRepresentativeImage.php b/src/Plugin/Field/FieldFormatter/EntityReferenceRepresentativeImage.php
index b867105..a9d0fe5 100644
--- a/src/Plugin/Field/FieldFormatter/EntityReferenceRepresentativeImage.php
+++ b/src/Plugin/Field/FieldFormatter/EntityReferenceRepresentativeImage.php
@@ -79,8 +79,8 @@ class EntityReferenceRepresentativeImage extends EntityReferenceFormatterBase {
     $form['type'] = [
       '#type' => 'select',
       '#options' => $this->fieldFormatterManager->getOptions('image'),
-      '#title' => t('Image formatter'),
-      '#default_value' => $this->getSettingFromFormState($form_state,'type'),
+      '#title' => $this->t('Image formatter'),
+      '#default_value' => $this->getSettingFromFormState($form_state, 'type'),
       '#required' => TRUE,
       '#ajax' => [
         'callback' => [$this, 'onFormatterTypeChange'],
@@ -185,7 +185,7 @@ class EntityReferenceRepresentativeImage extends EntityReferenceFormatterBase {
     $summary = parent::settingsSummary();
 
     $plugin = $this->getImageFieldFormatter($this->getSetting('type'), $this->getSetting('settings'));
-    $summary[] = $this->t('Formatter: @formatter', ['@formatter'=> $plugin->getPluginDefinition()['label']]);
+    $summary[] = $this->t('Formatter: @formatter', ['@formatter' => $plugin->getPluginDefinition()['label']]);
     $summary = array_merge($summary, $plugin->settingsSummary());
 
     return $summary;
diff --git a/src/Plugin/migrate/source/FieldConfig.php b/src/Plugin/migrate/source/FieldConfig.php
index cabe93d..7f759be 100644
--- a/src/Plugin/migrate/source/FieldConfig.php
+++ b/src/Plugin/migrate/source/FieldConfig.php
@@ -39,7 +39,7 @@ class FieldConfig extends FieldStorageConfig {
         $row->setSourceProperty('entity_type', $entity_type);
         $row->setSourceProperty('bundle', $bundle);
         $row->setSourceProperty('settings', [
-          'representative_image_field_name' => unserialize($row->getSourceProperty('value')),
+          'representative_image_field_name' => unserialize($row->getSourceProperty('value'), ['allowed_classes' => FALSE]),
         ]);
         return DrupalSqlBase::prepareRow($row);
       }
