Fix settlement serialisation/deserialisation