Bugfix in ID lookup