Replace some uses of var that were missed in the var->ref switch
Merge pull request #363 from ronawho/var-to-ref-fixes

Replace some uses of var that were missed in the var->ref switch

[reviewed by @Kyle-B]