diff --git a/ChangeLog b/ChangeLog
index 8ba6f445028cdcfb2eb02ab1eff172c85210c69d..b110284d9f00a8ae94c1396618bd6a761822ee44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2025-03-27  Uwe Schulzweida
+
+	* vlistChangeZaxis: added call to delete_chunks() (bug fix)
+
 2025-03-14  Uwe Schulzweida
 
 	* enable-hirlam-extensions failed since release 2.5.1 (bug fix)
diff --git a/src/vlist.c b/src/vlist.c
index a6bf4888ee0e7ebcea82061e0bcf35a52c14eb74..998026b61d9e8383fe6d6c45cf24a0f22a2fa7e3 100644
--- a/src/vlist.c
+++ b/src/vlist.c
@@ -507,6 +507,22 @@ vlist_generate_zaxis(int vlistID, int zaxistype, int nlevels, const double *leve
   return zaxisID;
 }
 
+static void
+delete_chunks(int vlistID, int varID)
+{
+  int chunkKeys[4] = { CDI_KEY_CHUNKSIZE_DIMX, CDI_KEY_CHUNKSIZE_DIMY, CDI_KEY_CHUNKSIZE_DIMZ, CDI_KEY_CHUNKSIZE_DIMT };
+  for (int i = 0; i < 4; ++i)
+    {
+      int chunkSize = 0;
+      cdiInqKeyInt(vlistID, varID, chunkKeys[i], &chunkSize);
+      if (chunkSize != 0) cdiDeleteKey(vlistID, varID, chunkKeys[i]);
+    }
+
+  int chunkSize = 0;
+  cdiInqKeyInt(vlistID, varID, CDI_KEY_CHUNKSIZE, &chunkSize);
+  if (chunkSize > 0) cdiDeleteKey(vlistID, varID, CDI_KEY_CHUNKSIZE);
+}
+
 /*
 @Function  vlistCopyFlag
 @Title     Copy some entries of a variable list
@@ -708,6 +724,7 @@ vlistCopyFlag(int vlistID2, int vlistID1)
 
                 zaxisID = zaxisID2;
                 vars2[varID2].zaxisID = zaxisID2;
+                delete_chunks(vlistID2, varID2);
               }
 
             for (int levID = 0; levID < nlevs2; levID++)
@@ -1350,22 +1367,6 @@ vlistGridIndex(int vlistID, int gridID)
   return index;
 }
 
-static void
-delete_chunks(int vlistID, int varID)
-{
-  int chunkKeys[4] = { CDI_KEY_CHUNKSIZE_DIMX, CDI_KEY_CHUNKSIZE_DIMY, CDI_KEY_CHUNKSIZE_DIMZ, CDI_KEY_CHUNKSIZE_DIMT };
-  for (int i = 0; i < 4; ++i)
-    {
-      int chunkSize = 0;
-      cdiInqKeyInt(vlistID, varID, chunkKeys[i], &chunkSize);
-      if (chunkSize != 0) cdiDeleteKey(vlistID, varID, chunkKeys[i]);
-    }
-
-  int chunkSize = 0;
-  cdiInqKeyInt(vlistID, varID, CDI_KEY_CHUNKSIZE, &chunkSize);
-  if (chunkSize > 0) cdiDeleteKey(vlistID, varID, CDI_KEY_CHUNKSIZE);
-}
-
 void
 vlistChangeGridIndex(int vlistID, int index, int gridID)
 {
@@ -1457,6 +1458,7 @@ vlistChangeZaxisIndex(int vlistID, int index, int zaxisID)
         if (vlistptr->vars[varID].zaxisID == zaxisIDold)
           {
             vlistptr->vars[varID].zaxisID = zaxisID;
+            delete_chunks(vlistID, varID);
             if (vlistptr->vars[varID].levinfo && nlevs != nlevsOld)
               {
                 vlistptr->vars[varID].levinfo
@@ -1490,6 +1492,7 @@ vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2)
     if (vlistptr->vars[varID].zaxisID == zaxisID1)
       {
         vlistptr->vars[varID].zaxisID = zaxisID2;
+        delete_chunks(vlistID, varID);
 
         if (vlistptr->vars[varID].levinfo && nlevs2 != nlevs1)
           {