Fix a bunch of issues with PK lookups