fixing has_field bug