Fix formatting in templates