fix some bugs related to delete action