Fix issue when removing all segments