Fix edge cases where all characters are removed by preprocessing.