Twig template fixes

Some fixes to the twig template.