Update flags usage in template to new api