fix hdf5_save_matrix