bugfix in batch_hdf