fixed bad scope lookup