modified some bugs