Assign variable BEFORE deleting