diff --git a/km3pipe/io/hdf5.py b/km3pipe/io/hdf5.py
index <HASH>..<HASH> 100644
--- a/km3pipe/io/hdf5.py
+++ b/km3pipe/io/hdf5.py
@@ -339,7 +339,7 @@ class HDF5Sink(Module):
 
         if arr.dtype != tab.dtype:
             try:
-                arr = Table(arr, tab.dtype)
+                arr = Table(arr.astype(tab.dtype))
             except ValueError:
                 self.log.critical(
                     "Cannot write a table to '%s' since its dtype is "
Try to change dtypes on the fly