Fix a stray > in the template and adding check for the content