fixed writing params to h5