change way to use templates variables, and naming mistake