variable reference fix