Move the deletion to after we need it