Changed serialization of primitives.