Added check on unit_field to make sure i exists before trying to delete it