Fix crashes related to currentWordRange