fix add bug and Modify logic