Updating before deleting