Add missing $template initialisation in params