fix some edge cases for filtering text