Added missing hdf5 and fixed some mistakes