diff --git a/src/parallel_io.c b/src/parallel_io.c
index c6bbcdfd3982ee5663ff54246feb58bebdbb0dad..2f70b470d959e2fd23a92fcd6f5e357220b2c54d 100644
--- a/src/parallel_io.c
+++ b/src/parallel_io.c
@@ -410,7 +410,9 @@ void read_ic_parallel(char* fileName, const struct UnitSystem* internal_units,
   if (h_grp < 0) error("Error while opening file header\n");
 
   /* Read the relevant information and print status */
-  readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy);
+  int flag_entropy_temp[6];
+  readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy_temp);
+  *flag_entropy = flag_entropy_temp[0];
   readAttribute(h_grp, "BoxSize", DOUBLE, boxSize);
   readAttribute(h_grp, "NumPart_Total", UINT, numParticles);
   readAttribute(h_grp, "NumPart_Total_HighWord", UINT, numParticles_highWord);
diff --git a/src/serial_io.c b/src/serial_io.c
index 91231e70c603fc882f38e73f3d545828613629fc..65f3e4798b71536d79264cfd3ccdc1102bb0084e 100644
--- a/src/serial_io.c
+++ b/src/serial_io.c
@@ -454,7 +454,9 @@ void read_ic_serial(char* fileName, const struct UnitSystem* internal_units,
     if (h_grp < 0) error("Error while opening file header\n");
 
     /* Read the relevant information and print status */
-    readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy);
+    int flag_entropy_temp[6];
+    readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy_temp);
+    *flag_entropy = flag_entropy_temp[0];
     readAttribute(h_grp, "BoxSize", DOUBLE, boxSize);
     readAttribute(h_grp, "NumPart_Total", UINT, numParticles);
     readAttribute(h_grp, "NumPart_Total_HighWord", UINT, numParticles_highWord);
diff --git a/src/single_io.c b/src/single_io.c
index f88f3da5c352fc30f1a34de453e9b9abfacd3ad7..3cc83e852db8dd04f7e4b4de56a76efca49d28ed 100644
--- a/src/single_io.c
+++ b/src/single_io.c
@@ -365,7 +365,9 @@ void read_ic_single(char* fileName, const struct UnitSystem* internal_units,
   if (h_grp < 0) error("Error while opening file header\n");
 
   /* Read the relevant information and print status */
-  readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy);
+  int flag_entropy_temp[6];
+  readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy_temp);
+  *flag_entropy = flag_entropy_temp[0];
   readAttribute(h_grp, "BoxSize", DOUBLE, boxSize);
   readAttribute(h_grp, "NumPart_Total", UINT, numParticles);
   readAttribute(h_grp, "NumPart_Total_HighWord", UINT, numParticles_highWord);