fixed serialization with datapoints