Fix for code crashing when name and title for templates in the shape file don't match