fix using wrong id in lookup