Fix bad variable ref