fixing bug in free var instantiation