added some null error to vector and segment