Update before deleting