Fix segmenting issue