diff --git a/bds/source/java/ch/systemsx/cisd/bds/hcs/HCSImageAnnotations.java b/bds/source/java/ch/systemsx/cisd/bds/hcs/HCSImageAnnotations.java
index 059cab011fb5ffc96fb5eed4d7d5f9e477b6763b..9095a07fb817d84c221d5a99c1eb9814967fe162 100644
--- a/bds/source/java/ch/systemsx/cisd/bds/hcs/HCSImageAnnotations.java
+++ b/bds/source/java/ch/systemsx/cisd/bds/hcs/HCSImageAnnotations.java
@@ -76,13 +76,15 @@ public final class HCSImageAnnotations implements IAnnotations
             throw new DataStructureException("One of the following formats expected instead of '"
                     + format + "': " + FORMATS);
         }
-        // final int channelCount =
-        // ((Integer) formattedData.getFormatParameters().getValue(
-        // HCSImageFormatV1_0.NUMBER_OF_CHANNELS)).intValue();
-        // if (channelCount != channels.size())
-        // {
-        // throw new DataStructureException("Channel counts do not match.");
-        // }
+        final int channelCount =
+                ((Integer) formattedData.getFormatParameters().getValue(
+                        HCSImageFormatV1_0.NUMBER_OF_CHANNELS)).intValue();
+        final int size = channels.size();
+        if (channelCount != size)
+        {
+            throw new DataStructureException(String.format(
+                    "Channel counts do not match (%d != %d).", channelCount, size));
+        }
     }
 
     public final void saveTo(final IDirectory directory)