Fix crash when segmented pieces are not enough