Error in twig extension