fix bad variable reference