fix bugs in delete feature
Merge remote-tracking branch 'upstream/master'