fix variable lookup