Fix lookup implementation