fix lookup by ID with non-existent IDs