fix bugs: more than one files are added or deleted