Fix small bug in finding word boundaries.