fix segments (str -> int)