diff --git a/MagickCore/cache.c b/MagickCore/cache.c
index 0c630bb..f591a1f 100644
--- a/MagickCore/cache.c
+++ b/MagickCore/cache.c
@@ -975,6 +975,7 @@
         }
       cache_offset=cache_info->offset;
     }
+if (0)
   if ((cache_info->type != MemoryCache) && (clone_info->type != MemoryCache) &&
       (strcmp(cache_info->cache_filename,clone_info->cache_filename) == 0))
     {
@@ -993,7 +994,6 @@
     }
   if (clone_info->type == DiskCache)
     {
-      (void) ClosePixelCacheOnDisk(clone_info);
       if (OpenPixelCacheOnDisk(clone_info,WriteMode) == MagickFalse)
         {
           if (cache_info->type == DiskCache)
@@ -4156,7 +4156,7 @@
               if (cache_info->metacontent_extent != 0)
                 cache_info->metacontent=(void *) (cache_info->pixels+
                   number_pixels*cache_info->number_channels);
-              if (source_info.storage_class != UndefinedClass)
+              if (source_info.type != UndefinedCache)
                 {
                   status=ClonePixelCachePixels(cache_info,&source_info,
                     exception);
@@ -4177,6 +4177,11 @@
         "CacheResourcesExhausted","`%s'",image->filename);
       return(MagickFalse);
     }
+  if (source_info.type != UndefinedCache)
+    {
+      (void) ClosePixelCacheOnDisk(cache_info);
+      *cache_info->cache_filename='\0';
+    }
   if (OpenPixelCacheOnDisk(cache_info,mode) == MagickFalse)
     {
       RelinquishMagickResource(DiskResource,cache_info->length);
@@ -4224,7 +4229,7 @@
               if (cache_info->metacontent_extent != 0)
                 cache_info->metacontent=(void *) (cache_info->pixels+
                   number_pixels*cache_info->number_channels);
-              if (source_info.storage_class != UndefinedClass)
+              if (source_info.type != UndefinedCache)
                 {
                   status=ClonePixelCachePixels(cache_info,&source_info,
                     exception);
@@ -4249,7 +4254,7 @@
       RelinquishMagickResource(MapResource,cache_info->length);
     }
   status=MagickTrue;
-  if ((source_info.type != UndefinedCache) && (mode != ReadMode))
+  if (source_info.type != UndefinedCache)
     {
       status=ClonePixelCachePixels(cache_info,&source_info,exception);
       RelinquishPixelCachePixels(&source_info);
diff --git a/MagickCore/segment.c b/MagickCore/segment.c
index 1af1734..a592854 100644
--- a/MagickCore/segment.c
+++ b/MagickCore/segment.c
@@ -1833,6 +1833,7 @@
   /*
     Initialize histogram.
   */
+  SyncImagePixelCache(image,exception);
   InitializeHistogram(image,histogram,exception);
   (void) OptimalTau(histogram[Red],Tau,0.2,DeltaTau,
     smooth_threshold == 0.0 ? 1.0 : smooth_threshold,extrema[Red]);
diff --git a/MagickCore/signature.c b/MagickCore/signature.c
index 43380d8..e445290 100644
--- a/MagickCore/signature.c
+++ b/MagickCore/signature.c
@@ -539,8 +539,6 @@
         traits=GetPixelChannelMapTraits(image,channel);
         if (traits == UndefinedPixelTrait)
           continue;
-        if ((traits & UpdatePixelTrait) == 0)
-          continue;
         pixel=QuantumScale*p[i];
         for (j=0; j < (ssize_t) sizeof(pixel); j++)
           *q++=(unsigned char) (&pixel)[j];