Fixed code to make sure title is only added to pages with comments