Fixed failed to build the route parameters in Twig extension