protected function formatFields()
    {
        $fields = $this->fields;

        if (!$fields instanceof AttributeCollection) {
            $fields = new AttributeCollection($fields, $this);
        }

        return $this->fields = $fields->formatFields();
    }