diff --git a/coders/avs.c b/coders/avs.c
index 9705443..54eb1e8 100644
--- a/coders/avs.c
+++ b/coders/avs.c
@@ -141,6 +141,7 @@
   /*
     Read AVS X image.
   */
+  image->matte=MagickTrue;
   width=ReadBlobMSBLong(image);
   height=ReadBlobMSBLong(image);
   if (EOFBlob(image) != MagickFalse)
@@ -152,7 +153,6 @@
     /*
       Convert AVS raster image to pixel packets.
     */
-    image->matte=MagickTrue;
     image->columns=width;
     image->rows=height;
     image->depth=8;
diff --git a/coders/palm.c b/coders/palm.c
index 8baf541..fd1fa99 100644
--- a/coders/palm.c
+++ b/coders/palm.c
@@ -513,7 +513,8 @@
     if (flags & PALM_HAS_TRANSPARENCY_FLAG)
       {
         if (bits_per_pixel != 16)
-          transpix=image->colormap[mask-transparentIndex];
+          SetPixelInfoPacket(image,image->colormap+(mask-transparentIndex),
+            &transpix);
         (void) TransparentPaintImage(image,&transpix,(Quantum) TransparentAlpha,
           MagickFalse,exception);
       }