Fix char twig function