Fixed text highlighting bug