by qianjun;fix bugs