Fix bug in _getVisibleText