Fix how IDs are discovered or created