fixes to closure templates