Fix bug

Prevents a rare error if the generated markov trims to nothing.