fix bug according to code pro