fixed most twig issues