Fix a bug in csv serialization.