medsupervisecode fix bug