Cannot get category.title to show up {% set slug = craft.request.getParam('s') %}

{% if slug | length %}
    {% set category = craft.categories.slug(slug) %}
    {% set faqs = craft.entries.section('faq').order('title').limit(null) %}

    &lt;h3&gt;{{ category.title }}&lt;/h3&gt;

    &lt;ul class="no-bullet"&gt;
        {% for entry in faqs.relatedTo(category) %}
            {% if entry.level &gt;1 %} 
                &lt;li&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/li&gt;
            {% endif %}  
        {% endfor %}
    &lt;/ul&gt;
{% else %}
    &lt;h3&gt; No matching results found &lt;/h3&gt;
{% endif %} 


In the code above, I cannot get {{ category.title }} to display. It is empty. If I put {{ category.slug }} instead, it shows the correct value. The other items in unordered list are displaying perfectly. I am confused as to why the title is not showing
Try changing this:

{% set category = craft.categories.slug(slug) %}


to

{% set category = craft.categories.slug(slug).first() %}