Fixes for Id field serialization/deserialization issues