fix bad var reference