modify some bugs of the previous file