fixing var lookup