fixed expand_segment rule