Segements are now sorted when read from json.