Fixed some errors with lookup.