Update and fix templates