More fixes to the template