Fix a memory bug in Segments

vector::push_back may incur a copy of the whole vector, thus addresses are changed.