Fixed twig filters

Fixes #1326