Changed segment id to string, fixed segment creation