fix some bug for program.