Added missing type argument to add_field()