Fix infinite recursion and elemgc immutability.