Correct variables passage to template