fix template expression to actually set the variables