Fix some bugs
Modified some files