Fix issue with lookupIndex