incorrect implementation of id type lookup