Category ID not being returned
The craft.categories tag returns an ElementCriteriaModel, so parentCategory.title really shouldn't work. Try changing the first line of code to:

{% set parentCategory = craft.categories.slug(craft.request.getSegment(2)).first() %}