fix use slice instead of truncatewords