revise some bugs