fix pack_params