text selection bug fix