Detect twig correctly