Fix problems with HDF5