fix unable to select segment bug