fix weird issue with twig and references