fix parm updating logic.