Fix bugs in ID system and serialization.