Fix bad variable reference