Fix wrong variable into template