Fixes to templater.