Fixed problem where Twig variables are not defined