Fix serialization of simple type attributes