text selection intersect bug fix