init attributes to prevent problems with twig with fresh document instances