protected function _cleanAttributes($attributes)
    {
        foreach ($attributes as $key => $value) {
            if (is_int($key) || in_array($key, $this->_config['ignored'])) {
                unset($attributes[$key]);
            } else if ($key != 'memberof' && is_array($value) && count($value) == 1) {
                $attributes[$key] = $value[0];
            }
        }

        return $attributes;
    }