fix hdf5 double free issue - maybe