Replace some uses of var that were missed in the var->ref switch

Replace some uses of var that were missed in the var->ref switch