fix study->variable reference