Fix reference to variables