Remove invalid reference to variable