Fix bug in segment only-child