Fixed variable name in delete_field function

I ran into this when trying to update rules.The variable $field was undefined. This renaming fixes this problem.