fix template variable replacing naming error