Fix hdf5 access pattern