loop fixes in twig template