fixed out of bounds exception in markov text generator