Fixed minor bug in enum serialization.