a few fixes to the template