Fix segment breaking