modify a bug,and modify some codes