Better handle ID generation.