diff --git a/src/EventSubscriber/ConfigIgnoreEventSubscriber.php b/src/EventSubscriber/ConfigIgnoreEventSubscriber.php
index 1e7936d..40caa08 100644
--- a/src/EventSubscriber/ConfigIgnoreEventSubscriber.php
+++ b/src/EventSubscriber/ConfigIgnoreEventSubscriber.php
@@ -147,16 +147,21 @@ class ConfigIgnoreEventSubscriber implements EventSubscriberInterface, CacheTags
           else {
             $destination_data = $destination_storage->read($config_name);
             $source_data = $transformation_storage->read($config_name);
-            foreach ($keys as $key) {
-              if (NestedArray::keyExists($destination_data, $key)) {
-                $value = NestedArray::getValue($destination_data, $key);
-                NestedArray::setValue($source_data, $key, $value);
-              }
-              else {
-                NestedArray::unsetValue($source_data, $key);
+            // The config doesn't exist in the database.
+            if (!$source_data) {
+              $transformation_storage->delete($config_name);
+            }
+            else {
+              foreach ($keys as $key) {
+                if (NestedArray::keyExists($destination_data, $key) && $value = NestedArray::getValue($destination_data, $key)) {
+                  NestedArray::setValue($source_data, $key, $value);
+                }
+                else {
+                  NestedArray::unsetValue($source_data, $key);
+                }
               }
+              $transformation_storage->write($config_name, $source_data);
             }
-            $transformation_storage->write($config_name, $source_data);
           }
         }
         // The config doesn't exist in the source storage.
