* fix all those tiny bugs pointed out by our new subtemplate checking