fix a problem that the database table is not updated successfully when deleted one item

fix a problem that the database table is not updated successfully when
deleted one item while the ui has been updated.