Fix test_segments test