fixed duplicate highlighting of the same character