Fixed invalid variable in template